?
Solved

Visual C++ 2008 Express  error C2039: 'ostream' : is not a member of 'std'

Posted on 2010-01-10
19
Medium Priority
?
3,613 Views
Last Modified: 2013-12-14
I am writing an application that uses IGSTK along with ITK, FLTK, and VTK and am currently trying to compile the examples provided with IGSTK in Visual C++ 2008 Express and get the following error:


Compiling...
HelloWorldGUI.cxx
c:\itk\itk-install\include\insighttoolkit\common\itkSmartPointer.h(129) : error C2061: syntax error : identifier 'ostream'
        c:\itk\itk-install\include\insighttoolkit\common\itkSmartPointer.h(149) : see reference to class template instantiation 'itk::SmartPointer<TObjectType>' being compiled
c:\itk\itk-install\include\insighttoolkit\common\itkSmartPointer.h(153) : error C2039: 'ostream' : is not a member of 'std'
c:\itk\itk-install\include\insighttoolkit\common\itkSmartPointer.h(153) : error C2143: syntax error : missing ';' before '&'
c:\itk\itk-install\include\insighttoolkit\common\itkSmartPointer.h(153) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\itk\itk-install\include\insighttoolkit\common\itkSmartPointer.h(153) : error C2039: 'ostream' : is not a member of 'std'
c:\itk\itk-install\include\insighttoolkit\common\itkSmartPointer.h(153) : error C2065: 'os' : undeclared identifier
c:\itk\itk-install\include\insighttoolkit\common\itkSmartPointer.h(153) : error C2065: 'T' : undeclared identifier
c:\itk\itk-install\include\insighttoolkit\common\itkSmartPointer.h(153) : error C2955: 'itk::SmartPointer' : use of class template requires template argument list
        c:\itk\itk-install\include\insighttoolkit\common\itkSmartPointer.h(43) : see declaration of 'itk::SmartPointer'
c:\itk\itk-install\include\insighttoolkit\common\itkSmartPointer.h(153) : error C2146: syntax error : missing ')' before identifier 'p'
c:\itk\itk-install\include\insighttoolkit\common\itkSmartPointer.h(153) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\itk\itk-install\include\insighttoolkit\common\itkSmartPointer.h(153) : fatal error C1903: unable to recover from previous error(s); stopping compilation
Build log was saved at "file://c:\AtamaiStandAlone\AtamaiStandAlone\AtamaiStandAlone\Release\BuildLog.htm"
AtamaiStandAlone - 11 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========



0
Comment
Question by:drew17
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 6
  • 4
  • +1
19 Comments
 
LVL 86

Expert Comment

by:jkr
ID: 26278417
What's your code?
0
 

Author Comment

by:drew17
ID: 26278442
Here is the source file, header file follows:


// generated by Fast Light User Interface Designer (fluid) version 1.0107

#include "HelloWorldGUI.h"

void HelloWorldGUI::cb_TrackingBt_i(Fl_Light_Button* o, void*) {
  this->SetTracking(o->value());
}
void HelloWorldGUI::cb_TrackingBt(Fl_Light_Button* o, void* v) {
  ((HelloWorldGUI*)(o->parent()->user_data()))->cb_TrackingBt_i(o,v);
}

void HelloWorldGUI::cb_SceneGraphBt_i(Fl_Light_Button* o, void*) {
  this->ShowSceneGraph(o->value());
}
void HelloWorldGUI::cb_SceneGraphBt(Fl_Light_Button* o, void* v) {
  ((HelloWorldGUI*)(o->parent()->user_data()))->cb_SceneGraphBt_i(o,v);
}

void HelloWorldGUI::cb_ExportBt_i(Fl_Button*, void*) {
  this->ExportSceneGraph(fileName);
}
void HelloWorldGUI::cb_ExportBt(Fl_Button* o, void* v) {
  ((HelloWorldGUI*)(o->parent()->user_data()))->cb_ExportBt_i(o,v);
}

void HelloWorldGUI::cb_Quit_i(Fl_Button*, void*) {
  this->Quit();
}
void HelloWorldGUI::cb_Quit(Fl_Button* o, void* v) {
  ((HelloWorldGUI*)(o->parent()->user_data()))->cb_Quit_i(o,v);
}

HelloWorldGUI::HelloWorldGUI() {
  Fl_Double_Window* w;
  { Fl_Double_Window* o = MainWindow = new Fl_Double_Window(515, 375, "IGSTK: HelloWorld Example");
    w = o;
    o->user_data((void*)(this));
    { igstk::FLTKWidget* o = Display = new igstk::FLTKWidget(5, 5, 505, 330, "Display");
      o->box(FL_FLAT_BOX);
      o->color(FL_FOREGROUND_COLOR);
      o->selection_color(FL_BACKGROUND_COLOR);
      o->labeltype(FL_NORMAL_LABEL);
      o->labelfont(0);
      o->labelsize(14);
      o->labelcolor(FL_BACKGROUND2_COLOR);
      o->align(FL_ALIGN_CENTER);
      o->when(FL_WHEN_RELEASE);
    }
    { Fl_Light_Button* o = TrackingBt = new Fl_Light_Button(5, 345, 85, 25, "Tracking");
      o->labelsize(11);
      o->callback((Fl_Callback*)cb_TrackingBt);
    }
    { Fl_Light_Button* o = SceneGraphBt = new Fl_Light_Button(95, 345, 85, 25, "SceneGraph");
      o->labelsize(11);
      o->callback((Fl_Callback*)cb_SceneGraphBt);
    }
    { Fl_Button* o = ExportBt = new Fl_Button(185, 345, 105, 25, "ExportSceneGraph");
      o->labelsize(11);
      o->callback((Fl_Callback*)cb_ExportBt);
    }
    { Fl_Button* o = new Fl_Button(421, 345, 90, 25, "Quit");
      o->callback((Fl_Callback*)cb_Quit);
    }
    o->end();
    o->resizable(o);
  }
  this->quit = false;
this->View = igstk::View3D::New();
this->Display->RequestSetView( this->View );
}

void HelloWorldGUI::Show() {
  this->quit = false;
this->MainWindow->show();
this->View->RequestStart();
}

void HelloWorldGUI::Quit() {
  this->View->RequestStop();
this->quit = true;
this->MainWindow->hide();
}

void HelloWorldGUI::SetTracking( bool tracking ) {
  if( tracking )
  {
  this->m_Tracker->RequestStartTracking();
  }
else
  {
  this->m_Tracker->RequestStopTracking();
  }
}

void HelloWorldGUI::ShowSceneGraph( bool showingSG ) {
  #ifdef IGSTK_USE_SceneGraphVisualization
igstk::SceneGraph* m_SceneGraph = igstk::SceneGraph::getInstance();  
m_SceneGraph->ShowSceneGraph(showingSG);
igstk::SceneGraphUI * m_SceneGraphUI = igstk::SceneGraphUI::getInstance();
m_SceneGraphUI->DrawSceneGraph(m_SceneGraph);
#else
fl_alert("SceneGraphVisualization is turned off in CMake configuration");
#endif
}

void HelloWorldGUI::ExportSceneGraph( std::string fileName) {
  #ifdef IGSTK_USE_SceneGraphVisualization
igstk::SceneGraph *m_SceneGraph = igstk::SceneGraph::getInstance();  
m_SceneGraph->ExportSceneGraphToDot(fileName);
#else
fl_alert("SceneGraphVisualization is turned off in CMake configuration");
#endif
}

HelloWorldGUI::~HelloWorldGUI() {
  delete Display;
}

void HelloWorldGUI::SetTracker( TrackerType * tracker) {
  this->m_Tracker = tracker;
}

bool HelloWorldGUI::HasQuitted() {
  return this->quit;
}


--------------------------------------
Here's the Header file:
--------------------------------------


// generated by Fast Light User Interface Designer (fluid) version 1.0107

#ifndef HelloWorldGUI_h
#define HelloWorldGUI_h

//using namespace std;
#include <stdio.h>
#include <tchar.h>
#include <cstdlib>
#include <math.h>

#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
#include <FL/fl_ask.H>
#include "igstkView3D.h"
#include "igstkFLTKWidget.h"
#include "igstkConfigure.h"
#ifdef IGSTK_USE_SceneGraphVisualization
#include "igstkSceneGraphUI.h"
#endif
#include <FL/Fl_Light_Button.H>
#include "igstkTracker.h"
#include <FL/Fl_Button.H>

class HelloWorldGUI {
typedef igstk::Tracker TrackerType;
typedef TrackerType::Pointer TrackerPointer;
  bool quit;
  TrackerPointer m_Tracker;
  public: std::string fileName;
public:
  igstk::View3D::Pointer  View;
  HelloWorldGUI();
  Fl_Double_Window *MainWindow;
  igstk::FLTKWidget *Display;
  Fl_Light_Button *TrackingBt;
private:
  void cb_TrackingBt_i(Fl_Light_Button*, void*);
  static void cb_TrackingBt(Fl_Light_Button*, void*);
public:
  Fl_Light_Button *SceneGraphBt;
private:
  void cb_SceneGraphBt_i(Fl_Light_Button*, void*);
  static void cb_SceneGraphBt(Fl_Light_Button*, void*);
public:
  Fl_Button *ExportBt;
private:
  void cb_ExportBt_i(Fl_Button*, void*);
  static void cb_ExportBt(Fl_Button*, void*);
  void cb_Quit_i(Fl_Button*, void*);
  static void cb_Quit(Fl_Button*, void*);
public:
  virtual void Show();
  virtual void Quit();
  virtual void SetTracking( bool tracking );
  virtual void ShowSceneGraph( bool showingSG );
  virtual void ExportSceneGraph( std::string fileName);
  virtual ~HelloWorldGUI();
  virtual void SetTracker( TrackerType * tracker);
  virtual bool HasQuitted();
};
#endif
0
 
LVL 86

Expert Comment

by:jkr
ID: 26278485
Try to explicitly include the STL header that defines the streams, e.g.

#include <stdio.h>
#include <tchar.h>
#include <cstdlib>
#include <math.h>

#include <fstream> // <--- this one
#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
#include <FL/fl_ask.H>
#include "igstkView3D.h"
#include "igstkFLTKWidget.h"
#include "igstkConfigure.h"
#ifdef IGSTK_USE_SceneGraphVisualization
#include "igstkSceneGraphUI.h"
#endif
#include <FL/Fl_Light_Button.H>
#include "igstkTracker.h"
#include <FL/Fl_Button.H>

Open in new window

0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
LVL 53

Expert Comment

by:Infinity08
ID: 26278583
Are you sure that this is the code that generated the error ? itkSmartPointer.h ?
0
 

Author Comment

by:drew17
ID: 26278617
The code that generates the error is part if the ITK (Insight Tool Kit), below is the code. I tried adding the #include <fstream> and it did nothing different.
/*=========================================================================

  Program:   Insight Segmentation & Registration Toolkit
  Module:    $RCSfile: itkSmartPointer.h,v $
  Language:  C++
  Date:      $Date: 2009-03-03 15:09:28 $
  Version:   $Revision: 1.40 $

  Copyright (c) Insight Software Consortium. All rights reserved.
  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.

     This software is distributed WITHOUT ANY WARRANTY; without even 
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
     PURPOSE.  See the above copyright notices for more information.

=========================================================================*/
#ifndef __itkSmartPointer_h
#define __itkSmartPointer_h

#include <iostream>

namespace itk
{

	/** \class SmartPointer
 * \brief Implements transparent reference counting.
 *
 * SmartPointer implements reference counting by overloading
 * operator -> (and *) among others. This allows natural interface
 * to the class referred to by the pointer without having to invoke
 * special Register()/UnRegister() methods directly.
 *
 * To compile / test this class
 * Windows: cl SmartPointerTest.cxx; .\SmartPointerTest.exe
 * linux:   c++ SmartPointerTest.cxx ./a.out
 * other:   CCcompiler SmartPointerTest.cxx  ./a.out
 *
 * \ingroup ITKSystemObjects
 * \ingroup DataAccess
 */
template <class TObjectType>
class SmartPointer 
{
public:
  typedef TObjectType ObjectType;
  
  /** Constructor  */
  SmartPointer () 
    { m_Pointer = 0; }

  /** Copy constructor  */
  SmartPointer (const SmartPointer<ObjectType> &p):
    m_Pointer(p.m_Pointer)
    { this->Register(); }
  
  /** Constructor to pointer p  */
  SmartPointer (ObjectType *p):
    m_Pointer(p)
    { this->Register(); }
  
  /** Destructor  */
  ~SmartPointer ()
    {
    this->UnRegister();
    m_Pointer = 0;  
    }
  
  /** Overload operator ->  */
  ObjectType *operator -> () const
    { return m_Pointer; }

  /** Return pointer to object.  */
  operator ObjectType * () const 
    { return m_Pointer; }
  
  /** Test if the pointer has been initialized */
  bool IsNotNull() const
    { return m_Pointer != 0; }
  bool IsNull() const
    { return m_Pointer == 0; }

  /** Template comparison operators. */
  template <typename TR>
  bool operator == ( TR r ) const
    { return (m_Pointer == static_cast<const ObjectType*>(r) ); }

  template <typename TR>
  bool operator != ( TR r ) const
    { return (m_Pointer != static_cast<const ObjectType*>(r) ); }
    
  /** Access function to pointer. */
  ObjectType *GetPointer () const 
    { return m_Pointer; }
  
  /** Comparison of pointers. Less than comparison.  */
  bool operator < (const SmartPointer &r) const
    { return (void*)m_Pointer < (void*) r.m_Pointer; }
  
  /** Comparison of pointers. Greater than comparison.  */
  bool operator > (const SmartPointer &r) const
    { return (void*)m_Pointer > (void*) r.m_Pointer; }

  /** Comparison of pointers. Less than or equal to comparison.  */
  bool operator <= (const SmartPointer &r) const
    { return (void*)m_Pointer <= (void*) r.m_Pointer; }

  /** Comparison of pointers. Greater than or equal to comparison.  */
  bool operator >= (const SmartPointer &r) const
    { return (void*)m_Pointer >= (void*) r.m_Pointer; }

  /** Overload operator assignment.  */
  SmartPointer &operator = (const SmartPointer &r)
    { return this->operator = (r.GetPointer()); }
  
  /** Overload operator assignment.  */
  SmartPointer &operator = (ObjectType *r)
    {
    if (m_Pointer != r)
      {
      ObjectType* tmp = m_Pointer; //avoid recursive unregisters by retaining temporarily
      m_Pointer = r;
      this->Register();
      if ( tmp ) { tmp->UnRegister(); }
      }
    return *this;
    }
  
  /** Function to print object pointed to  */
  ObjectType *Print (std::ostream& os) const // <----- HERE is where the error occurs
    { 
    // This prints the object pointed to by the pointer  
    (*m_Pointer).Print(os);  
    return m_Pointer;
    } 

private:
  /** The pointer to the object referrred to by this smart pointer. */
  ObjectType* m_Pointer;

  void Register()
    { 
    if(m_Pointer) { m_Pointer->Register(); }
    }
  
  void UnRegister()
    {
    if(m_Pointer) { m_Pointer->UnRegister(); }
    }
};  

  
template <typename T>
std::ostream& operator<< (std::ostream& os, SmartPointer<T> p) 
{
  p.Print(os); 
  return os;
}

} // end namespace itk
  
#endif

Open in new window

0
 
LVL 86

Expert Comment

by:jkr
ID: 26278635
Hm, by incuding 'iostream' in the header, 'ostream' should be there - if not, including 'fstream' as a workaround should make it compile, as above. Have you tried that already?
0
 

Author Comment

by:drew17
ID: 26278639
I tried that and it still did not compile, get the same errors as above
0
 
LVL 86

Expert Comment

by:jkr
ID: 26278754
Hm, does a simple

#include <iostream>

int main () {

  std::ostream os;

  return 0;
}

compile?
0
 
LVL 17

Expert Comment

by:rstaveley
ID: 26278864
It is conceivable (but doubtful) that you need to change

#include <stdio.h>

...for...

#include <cstdio>

I only say this because it looks like the std namespace is awry.
0
 
LVL 17

Expert Comment

by:rstaveley
ID: 26278876
It may be more informative to try the following for JKR's experiment.
#include <iostream>

int main () 
{
  std::ostream& os = std::cout;
  os << "Yes\n";
}

Open in new window

0
 

Author Comment

by:drew17
ID: 26279961
Thanks for the replies.

I have tried using #include <cstdio> rather than #include <stdio.h> and that did not work.

Next I tried to compile the simple main suggested and it also failed to compile, here is the result...

------ Build started: Project: AtamaiStandAlone, Configuration: Release Win32 ------
Compiling...
test.cpp
.\test.cpp(7) : error C2039: 'ostream' : is not a member of 'std'
.\test.cpp(7) : error C2065: 'ostream' : undeclared identifier
.\test.cpp(7) : error C2065: 'os' : undeclared identifier
.\test.cpp(7) : error C2039: 'cout' : is not a member of 'std'
.\test.cpp(7) : error C2065: 'cout' : undeclared identifier
.\test.cpp(8) : error C2065: 'os' : undeclared identifier
Build log was saved at "file://c:\AtamaiStandAlone\AtamaiStandAlone\AtamaiStandAlone\Release\BuildLog.htm"
AtamaiStandAlone - 6 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

0
 
LVL 53

Expert Comment

by:Infinity08
ID: 26280925
What compiler are you using ?
0
 
LVL 17

Expert Comment

by:rstaveley
ID: 26281427
Best to get the smiple test to work first.

In the simple test, check that:

1. You are building a console application (create a new project if needs be an select "Win32 Console")
2. You are not using precompiled headers

Look in Project | Properties | Configuration Properties | C/C++ | Precompiled Headers (I'm assuming VS8 Express has the same menu as the commercial version) to check for precompiled headers.

If this doesn't help, I suggest re-installing Visual Studio Express, because it looks like your standard library headers are messed up.
0
 
LVL 17

Expert Comment

by:rstaveley
ID: 26281447
Oh.... and please could you paste file://c:\AtamaiStandAlone\AtamaiStandAlone\AtamaiStandAlone\Release\BuildLog.htm so we can see the compilation command line.
0
 

Author Comment

by:drew17
ID: 26283987
Creating a new project with just the simple test compiles without any issues.

Here is the build log:

Build Log
              
Build started: Project: AtamaiStandAlone, Configuration: Release|Win32


Command Lines
              
Creating temporary file "c:\AtamaiStandAlone\AtamaiStandAlone\AtamaiStandAlone\Release\RSP0000C216483800.rsp" with contents
[
/O2 /Oi /GL /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\vxl\vcl\win32-vc70" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\vxl\vcl\win32-vc60" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\vxl\vcl\vcl_sys" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\vxl\vcl\sunpro" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\vxl\vcl\stlport" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\vxl\vcl\sgi" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\vxl\vcl\mwerks" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\vxl\vcl\generic" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\vxl\vcl\iso" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\vxl\vcl\gcc-libstdcxx-v3" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\vxl\vcl\gcc-295" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\vxl\vcl\gcc" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\vxl\vcl\emulation" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\vxl\vcl\egcs" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\vxl\vcl\borland56" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\vxl\vcl\borland55" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\vxl\vcl" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\vxl\v3p\netlib\toms" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\vxl\v3p\netlib\temperton" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\vxl\v3p\netlib\sparse" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\vxl\v3p\netlib\opt" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\vxl\v3p\netlib\napack" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\vxl\v3p\netlib\minpack" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\vxl\v3p\netlib\mathews" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\vxl\v3p\netlib\linpack" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\vxl\v3p\netlib\linalg" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\vxl\v3p\netlib\laso" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\vxl\v3p\netlib\lapack\util" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\vxl\v3p\netlib\lapack\single" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\vxl\v3p\netlib\lapack\double" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\vxl\v3p\netlib\lapack\complex16" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\vxl\v3p\netlib\lapack" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\vxl\v3p\netlib\eispack" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\vxl\v3p\netlib\datapac" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\vxl\v3p\netlib\blas" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\vxl\v3p\netlib" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\vxl\v3p" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\vxl\core\vnl\algo" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\vxl\core\vnl" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\vxl\core" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\vxl" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\NrrdIO" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\MetaIO" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\itkzlib" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\itktiff" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\itksys\stl" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\itksys\ios" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\itksys" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\itkpng" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\itkExtHdrs" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities\expat" /I "C:\ITK\ITK-Install\include\InsightToolkit\Utilities" /I "C:\ITK\ITK-Install\include\InsightToolkit\SpatialObject" /I "C:\ITK\ITK-Install\include\InsightToolkit\Numerics\Statistics" /I "C:\ITK\ITK-Install\include\InsightToolkit\Numerics\NeuralNetworks" /I "C:\ITK\ITK-Install\include\InsightToolkit\Numerics\FEM" /I "C:\ITK\ITK-Install\include\InsightToolkit\Numerics" /I "C:\ITK\ITK-Install\include\InsightToolkit\IO" /I "C:\ITK\ITK-Install\include\InsightToolkit\gdcm\src" /I "C:\ITK\ITK-Install\include\InsightToolkit\gdcm\Dicts" /I "C:\ITK\ITK-Install\include\InsightToolkit\gdcm" /I "C:\ITK\ITK-Install\include\InsightToolkit\Common" /I "C:\ITK\ITK-Install\include\InsightToolkit\BasicFilters" /I "C:\ITK\ITK-Install\include\InsightToolkit\Algorithms" /I "C:\VTK\VTK-Install\include\vtk-5.4" /I "C:\FLTK\FLTK-Install\include" /I "C:\IGSTK\IGSTK-Install\include\IGSTK" /I "C:\ITK\ITK-Install\include\InsightToolkit" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_UNICODE" /D "UNICODE" /FD /EHsc /MD /Gy /Fo"Release\\" /Fd"Release\vc90.pdb" /W3 /c /Zi /TP .\test.cpp
]
Creating command line "cl.exe @c:\AtamaiStandAlone\AtamaiStandAlone\AtamaiStandAlone\Release\RSP0000C216483800.rsp /nologo /errorReport:prompt"
Output Window
              
Compiling...
test.cpp
.\test.cpp(8) : error C2039: 'ostream' : is not a member of 'std'
.\test.cpp(8) : error C2065: 'ostream' : undeclared identifier
.\test.cpp(8) : error C2065: 'os' : undeclared identifier
Results
              
Build log was saved at "file://c:\AtamaiStandAlone\AtamaiStandAlone\AtamaiStandAlone\Release\BuildLog.htm"
AtamaiStandAlone - 3 error(s), 0 warning(s)
0
 
LVL 17

Accepted Solution

by:
rstaveley earned 2000 total points
ID: 26284217
I'd check your CMake settings. According to the IGSTK book at http://www.igstk.org/IGSTK/img/IGSTKTheBookV2.pdf you have to be sure to get the right version set up.

Seeing 'win32-vc70' in your first include directory makes it look like you have VC7 rather than 8. It looks likely to be wrong that you should have utilities for all those other compilers in your include path too (e.g. Borland, GCC,...).
0
 
LVL 17

Expert Comment

by:rstaveley
ID: 26284362
To sanity-check your Visual Studio set-up, however, you should try creating a new console project with the same test. You will need to create a console project, disable precompiled headers and replace stub with #include stdafx.h and _tmain() with the same test code you had in test.cpp.
0
 

Author Comment

by:drew17
ID: 26285212
I re-built IGSTK and compiled a few of the included examples... they compiled! I think one of the main problems was I included too many of the ITK include directories. From here I will base my project on one of the examples.

Thank you for all your help!
0
 
LVL 17

Expert Comment

by:rstaveley
ID: 26285603
Looks like it is an interesting project. Best of luck with it.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question