[vtkusers] vtk and tcl ambiguous symbols

Hans Fraaije j.fraaije at tiscali.nl
Fri Apr 23 09:51:21 EDT 2004


Hello

I am writing a C++ library (mylib), to be accessible with a script (tcl,
python, perl). I generate the wrapper my_lib_wrap.cxx with SWIG. This works
fine.

For the graphics part of the library I would like to use vtk, so that the
script calls a my_function from my_library, with in term uses the vtk
classes. I am using Microsoft Visual Studio 6 under XP for development.

In the version I have now, I can get either tcl + mylib swigged, compiled,
linked and executed, or vtk + mylib (without tcl) compiled, linked and
executed, but when I include vtk in a working tcl+mylib program, I get a lot
of errors.

The compiler complains about ambiguous symbols, all have to do with IO high
up in VC98 include files:
for example
 'streambuf' ambiguous symbol ( in VC98\include\ios.h)
'streampos' ambigous symbol (in VC98\include\streamb.h)
'streamoff' ambigous symbol (in VC98\include\streamb.h)
'ios' ambigous symbol (in VC98\include\ios.h)

I think that vtk also uses these symbols, somewhere, but I am puzzled why
the interference with tcl

I use vtk42 (and tcl83)
library modules
(microsoft.libs) ... opengl32.lib glu32.lib vtkRendering.lib vtkGraphics.lib
vtkImaging.lib vtkFiltering.lib vtkCommon.lib vtkftgl.lib vtkfreetype.lib
tcl83.lib

Is there a way to avoid the ambiguity? Why do tcl and vtk bite? (I am NOT
using the tclwrapper library from vtk, just vtkRendering.lib etc.)

Kind regards

Hans Fraaije

perhaps
KInd regards





More information about the vtkusers mailing list