[vtkusers] (no subject)

zwei at imaging.robarts.ca zwei at imaging.robarts.ca
Tue Aug 22 07:15:04 EDT 2006


Dear friends,

I'm running cone2.cxx, an example at vtk website (www.vtk.org) by using
vtk5.0 and vc 6.0. There was an error occured as following:

error LNK2001: unresolved external symbol "class ostream_withassign  cerr"
(?cerr@@3Vostream_withassign@@A)

The project settings were:

kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib
shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib
shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
vtkCommon.lib vtkRendering.lib vtkGraphics.lib vtkFiltering.lib
vtkHybrid.lib vtkImaging.lib vtkIO.lib glu32.lib opengl32.lib
vtkfreetype.lib vtkpng.lib vtktiff.lib vtkzlib.lib vtkjpeg.lib
vtkexpat.lib vtkwidgets.lib /nologo /subsystem:console /incremental:yes
/pdb:"Debug/cone3.pdb" /debug /machine:I386 /nodefaultlib:"LIBCD.lib"
/nodefaultlib:"LIBCID.lib" /nodefaultlib:"LIBCPD.lib"
/out:"Debug/cone3.exe" /pdbtype:sept

When I put
1. #include<iostream>
2. using namespace std;

before the definition of class vtkMyCallback and after #include files, the
error changed to:
error C2872: 'cout' : ambiguous symbol.

When I put 1 and 2 after the definition of class vtkMyCallback and before
the main function, the error stayed the same, which was

error LNK2001: unresolved external symbol "class ostream_withassign  cerr"
(?cerr@@3Vostream_withassign@@A).

When I use vtk 4.2 to run cone2.cxx, there was no such kind of problem.

Thank you very much for your advice to fix this problem!

Regards,
Zhouping




More information about the vtkusers mailing list