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

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 ==========



drew17Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jkrCommented:
What's your code?
0
drew17Author Commented:
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
jkrCommented:
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
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Infinity08Commented:
Are you sure that this is the code that generated the error ? itkSmartPointer.h ?
0
drew17Author Commented:
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
jkrCommented:
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
drew17Author Commented:
I tried that and it still did not compile, get the same errors as above
0
jkrCommented:
Hm, does a simple

#include <iostream>

int main () {

  std::ostream os;

  return 0;
}

compile?
0
rstaveleyCommented:
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
rstaveleyCommented:
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
drew17Author Commented:
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
Infinity08Commented:
What compiler are you using ?
0
rstaveleyCommented:
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
rstaveleyCommented:
Oh.... and please could you paste file://c:\AtamaiStandAlone\AtamaiStandAlone\AtamaiStandAlone\Release\BuildLog.htm so we can see the compilation command line.
0
drew17Author Commented:
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
rstaveleyCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rstaveleyCommented:
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
drew17Author Commented:
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
rstaveleyCommented:
Looks like it is an interesting project. Best of luck with it.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Editors IDEs

From novice to tech pro — start learning today.