drew17
asked on
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 \insightto olkit\comm on\itkSmar tPointer.h (129) : error C2061: syntax error : identifier 'ostream'
c:\itk\itk-install\include \insightto olkit\comm on\itkSmar tPointer.h (149) : see reference to class template instantiation 'itk::SmartPointer<TObject Type>' being compiled
c:\itk\itk-install\include \insightto olkit\comm on\itkSmar tPointer.h (153) : error C2039: 'ostream' : is not a member of 'std'
c:\itk\itk-install\include \insightto olkit\comm on\itkSmar tPointer.h (153) : error C2143: syntax error : missing ';' before '&'
c:\itk\itk-install\include \insightto olkit\comm on\itkSmar tPointer.h (153) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\itk\itk-install\include \insightto olkit\comm on\itkSmar tPointer.h (153) : error C2039: 'ostream' : is not a member of 'std'
c:\itk\itk-install\include \insightto olkit\comm on\itkSmar tPointer.h (153) : error C2065: 'os' : undeclared identifier
c:\itk\itk-install\include \insightto olkit\comm on\itkSmar tPointer.h (153) : error C2065: 'T' : undeclared identifier
c:\itk\itk-install\include \insightto olkit\comm on\itkSmar tPointer.h (153) : error C2955: 'itk::SmartPointer' : use of class template requires template argument list
c:\itk\itk-install\include \insightto olkit\comm on\itkSmar tPointer.h (43) : see declaration of 'itk::SmartPointer'
c:\itk\itk-install\include \insightto olkit\comm on\itkSmar tPointer.h (153) : error C2146: syntax error : missing ')' before identifier 'p'
c:\itk\itk-install\include \insightto olkit\comm on\itkSmar tPointer.h (153) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\itk\itk-install\include \insightto olkit\comm on\itkSmar tPointer.h (153) : fatal error C1903: unable to recover from previous error(s); stopping compilation
Build log was saved at "file://c:\AtamaiStandAlon e\AtamaiSt andAlone\A tamaiStand Alone\Rele ase\BuildL og.htm"
AtamaiStandAlone - 11 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Compiling...
HelloWorldGUI.cxx
c:\itk\itk-install\include
c:\itk\itk-install\include
c:\itk\itk-install\include
c:\itk\itk-install\include
c:\itk\itk-install\include
c:\itk\itk-install\include
c:\itk\itk-install\include
c:\itk\itk-install\include
c:\itk\itk-install\include
c:\itk\itk-install\include
c:\itk\itk-install\include
c:\itk\itk-install\include
c:\itk\itk-install\include
Build log was saved at "file://c:\AtamaiStandAlon
AtamaiStandAlone - 11 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
What's your code?
ASKER
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_Tracking Bt_i(Fl_Li ght_Button * o, void*) {
this->SetTracking(o->value ());
}
void HelloWorldGUI::cb_Tracking Bt(Fl_Ligh t_Button* o, void* v) {
((HelloWorldGUI*)(o->paren t()->user_ data()))-> cb_Trackin gBt_i(o,v) ;
}
void HelloWorldGUI::cb_SceneGra phBt_i(Fl_ Light_Butt on* o, void*) {
this->ShowSceneGraph(o->va lue());
}
void HelloWorldGUI::cb_SceneGra phBt(Fl_Li ght_Button * o, void* v) {
((HelloWorldGUI*)(o->paren t()->user_ data()))-> cb_SceneGr aphBt_i(o, v);
}
void HelloWorldGUI::cb_ExportBt _i(Fl_Butt on*, void*) {
this->ExportSceneGraph(fil eName);
}
void HelloWorldGUI::cb_ExportBt (Fl_Button * o, void* v) {
((HelloWorldGUI*)(o->paren t()->user_ data()))-> cb_ExportB t_i(o,v);
}
void HelloWorldGUI::cb_Quit_i(F l_Button*, void*) {
this->Quit();
}
void HelloWorldGUI::cb_Quit(Fl_ Button* o, void* v) {
((HelloWorldGUI*)(o->paren t()->user_ data()))-> cb_Quit_i( o,v);
}
HelloWorldGUI::HelloWorldG UI() {
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_COL OR);
o->selection_color(FL_BACK GROUND_COL OR);
o->labeltype(FL_NORMAL_LAB EL);
o->labelfont(0);
o->labelsize(14);
o->labelcolor(FL_BACKGROUN D2_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_Trackin gBt);
}
{ Fl_Light_Button* o = SceneGraphBt = new Fl_Light_Button(95, 345, 85, 25, "SceneGraph");
o->labelsize(11);
o->callback((Fl_Callback*) cb_SceneGr aphBt);
}
{ Fl_Button* o = ExportBt = new Fl_Button(185, 345, 105, 25, "ExportSceneGraph");
o->labelsize(11);
o->callback((Fl_Callback*) cb_ExportB t);
}
{ 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->RequestSetV iew( 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->RequestSt artTrackin g();
}
else
{
this->m_Tracker->RequestSt opTracking ();
}
}
void HelloWorldGUI::ShowSceneGr aph( bool showingSG ) {
#ifdef IGSTK_USE_SceneGraphVisual ization
igstk::SceneGraph* m_SceneGraph = igstk::SceneGraph::getInst ance();
m_SceneGraph->ShowSceneGra ph(showing SG);
igstk::SceneGraphUI * m_SceneGraphUI = igstk::SceneGraphUI::getIn stance();
m_SceneGraphUI->DrawSceneG raph(m_Sce neGraph);
#else
fl_alert("SceneGraphVisual ization is turned off in CMake configuration");
#endif
}
void HelloWorldGUI::ExportScene Graph( std::string fileName) {
#ifdef IGSTK_USE_SceneGraphVisual ization
igstk::SceneGraph *m_SceneGraph = igstk::SceneGraph::getInst ance();
m_SceneGraph->ExportSceneG raphToDot( fileName);
#else
fl_alert("SceneGraphVisual ization is turned off in CMake configuration");
#endif
}
HelloWorldGUI::~HelloWorld GUI() {
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_SceneGraphVisual ization
#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_B utton*, void*);
static void cb_TrackingBt(Fl_Light_But ton*, void*);
public:
Fl_Light_Button *SceneGraphBt;
private:
void cb_SceneGraphBt_i(Fl_Light _Button*, void*);
static void cb_SceneGraphBt(Fl_Light_B utton*, 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
// generated by Fast Light User Interface Designer (fluid) version 1.0107
#include "HelloWorldGUI.h"
void HelloWorldGUI::cb_Tracking
this->SetTracking(o->value
}
void HelloWorldGUI::cb_Tracking
((HelloWorldGUI*)(o->paren
}
void HelloWorldGUI::cb_SceneGra
this->ShowSceneGraph(o->va
}
void HelloWorldGUI::cb_SceneGra
((HelloWorldGUI*)(o->paren
}
void HelloWorldGUI::cb_ExportBt
this->ExportSceneGraph(fil
}
void HelloWorldGUI::cb_ExportBt
((HelloWorldGUI*)(o->paren
}
void HelloWorldGUI::cb_Quit_i(F
this->Quit();
}
void HelloWorldGUI::cb_Quit(Fl_
((HelloWorldGUI*)(o->paren
}
HelloWorldGUI::HelloWorldG
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_COL
o->selection_color(FL_BACK
o->labeltype(FL_NORMAL_LAB
o->labelfont(0);
o->labelsize(14);
o->labelcolor(FL_BACKGROUN
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*)
}
{ Fl_Light_Button* o = SceneGraphBt = new Fl_Light_Button(95, 345, 85, 25, "SceneGraph");
o->labelsize(11);
o->callback((Fl_Callback*)
}
{ Fl_Button* o = ExportBt = new Fl_Button(185, 345, 105, 25, "ExportSceneGraph");
o->labelsize(11);
o->callback((Fl_Callback*)
}
{ Fl_Button* o = new Fl_Button(421, 345, 90, 25, "Quit");
o->callback((Fl_Callback*)
}
o->end();
o->resizable(o);
}
this->quit = false;
this->View = igstk::View3D::New();
this->Display->RequestSetV
}
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
if( tracking )
{
this->m_Tracker->RequestSt
}
else
{
this->m_Tracker->RequestSt
}
}
void HelloWorldGUI::ShowSceneGr
#ifdef IGSTK_USE_SceneGraphVisual
igstk::SceneGraph* m_SceneGraph = igstk::SceneGraph::getInst
m_SceneGraph->ShowSceneGra
igstk::SceneGraphUI * m_SceneGraphUI = igstk::SceneGraphUI::getIn
m_SceneGraphUI->DrawSceneG
#else
fl_alert("SceneGraphVisual
#endif
}
void HelloWorldGUI::ExportScene
#ifdef IGSTK_USE_SceneGraphVisual
igstk::SceneGraph *m_SceneGraph = igstk::SceneGraph::getInst
m_SceneGraph->ExportSceneG
#else
fl_alert("SceneGraphVisual
#endif
}
HelloWorldGUI::~HelloWorld
delete Display;
}
void HelloWorldGUI::SetTracker(
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_SceneGraphVisual
#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_B
static void cb_TrackingBt(Fl_Light_But
public:
Fl_Light_Button *SceneGraphBt;
private:
void cb_SceneGraphBt_i(Fl_Light
static void cb_SceneGraphBt(Fl_Light_B
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
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>
Are you sure that this is the code that generated the error ? itkSmartPointer.h ?
ASKER
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
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?
ASKER
I tried that and it still did not compile, get the same errors as above
Hm, does a simple
#include <iostream>
int main () {
std::ostream os;
return 0;
}
compile?
#include <iostream>
int main () {
std::ostream os;
return 0;
}
compile?
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.
#include <stdio.h>
...for...
#include <cstdio>
I only say this because it looks like the std namespace is awry.
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";
}
ASKER
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:\AtamaiStandAlon e\AtamaiSt andAlone\A tamaiStand Alone\Rele ase\BuildL og.htm"
AtamaiStandAlone - 6 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
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:\AtamaiStandAlon
AtamaiStandAlone - 6 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
What compiler are you using ?
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.
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.
Oh.... and please could you paste file://c:\AtamaiStandAlone \AtamaiSta ndAlone\At amaiStandA lone\Relea se\BuildLo g.htm so we can see the compilation command line.
ASKER
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\Atama iStandAlon e\AtamaiSt andAlone\R elease\RSP 0000C21648 3800.rsp" with contents
[
/O2 /Oi /GL /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\vxl \vcl\win32 -vc70" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\vxl \vcl\win32 -vc60" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\vxl \vcl\vcl_s ys" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\vxl \vcl\sunpr o" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\vxl \vcl\stlpo rt" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\vxl \vcl\sgi" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\vxl \vcl\mwerk s" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\vxl \vcl\gener ic" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\vxl \vcl\iso" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\vxl \vcl\gcc-l ibstdcxx-v 3" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\vxl \vcl\gcc-2 95" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\vxl \vcl\gcc" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\vxl \vcl\emula tion" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\vxl \vcl\egcs" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\vxl \vcl\borla nd56" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\vxl \vcl\borla nd55" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\vxl \vcl" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\vxl \v3p\netli b\toms" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\vxl \v3p\netli b\temperto n" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\vxl \v3p\netli b\sparse" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\vxl \v3p\netli b\opt" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\vxl \v3p\netli b\napack" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\vxl \v3p\netli b\minpack" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\vxl \v3p\netli b\mathews" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\vxl \v3p\netli b\linpack" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\vxl \v3p\netli b\linalg" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\vxl \v3p\netli b\laso" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\vxl \v3p\netli b\lapack\u til" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\vxl \v3p\netli b\lapack\s ingle" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\vxl \v3p\netli b\lapack\d ouble" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\vxl \v3p\netli b\lapack\c omplex16" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\vxl \v3p\netli b\lapack" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\vxl \v3p\netli b\eispack" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\vxl \v3p\netli b\datapac" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\vxl \v3p\netli b\blas" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\vxl \v3p\netli b" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\vxl \v3p" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\vxl \core\vnl\ algo" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\vxl \core\vnl" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\vxl \core" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\vxl " /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\Nrr dIO" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\Met aIO" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\itk zlib" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\itk tiff" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\itk sys\stl" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\itk sys\ios" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\itk sys" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\itk png" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\itk ExtHdrs" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities\exp at" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Uti lities" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Spa tialObject " /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Num erics\Stat istics" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Num erics\Neur alNetworks " /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Num erics\FEM" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Num erics" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\IO" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\gdc m\src" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\gdc m\Dicts" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\gdc m" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Com mon" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Bas icFilters" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit\Alg orithms" /I "C:\VTK\VTK-Install\includ e\vtk-5.4" /I "C:\FLTK\FLTK-Install\incl ude" /I "C:\IGSTK\IGSTK-Install\in clude\IGST K" /I "C:\ITK\ITK-Install\includ e\InsightT oolkit" /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\Atama iStandAlon e\AtamaiSt andAlone\R elease\RSP 0000C21648 3800.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:\AtamaiStandAlon e\AtamaiSt andAlone\A tamaiStand Alone\Rele ase\BuildL og.htm"
AtamaiStandAlone - 3 error(s), 0 warning(s)
Here is the build log:
Build Log
Build started: Project: AtamaiStandAlone, Configuration: Release|Win32
Command Lines
Creating temporary file "c:\AtamaiStandAlone\Atama
[
/O2 /Oi /GL /I "C:\ITK\ITK-Install\includ
]
Creating command line "cl.exe @c:\AtamaiStandAlone\Atama
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:\AtamaiStandAlon
AtamaiStandAlone - 3 error(s), 0 warning(s)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
ASKER
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!
Thank you for all your help!
Looks like it is an interesting project. Best of luck with it.