[vtkusers] vtkMy Build and VC++ 6.0

Brad King brad.king at kitware.com
Mon Feb 16 09:39:05 EST 2004


Bruce Lamond wrote:
> Hi there,
> I'm using the installed version of vtk4.2
> 
> Quoting Brad King <brad.king at kitware.com>:
> 
> 
>>Bruce Lamond wrote:
>>
>>>hi there,
>>>
>>>I've got the same problem as Christopher R. Volpe who posted on Wed, 25 Dec
>>
>>2002
>>
>>>11:47:12 -0500 but unfortunately didn't get any follow up to his mail. I'm
>>>trying also to build the out of source vtkMy project with VC++ 6.0. I've
>>>followed the instructions in the readme to the letter (set relevant PATH
>>
>>and
>>
>>>TCL
>>
>>LIBPATH vars), ran cmake (advanced options all look OK) and tried to build
>>
>>>the supplied template project but get the following error:
>>>
>>>--------------------Configuration: vtkmyImagingTCL - Win32
>>
>>Debug--------------------
>>
>>>Linking...
>>>   Creating library
>>>C:\programming\HybridRendering\vtkMy\bin\Debug/vtkmyImagingTCL.lib and
>>
>>object
>>
>>>C:\programming\HybridRendering\vtkMy\bin\Debug/vtkmyImagingTCL.exp
>>>vtkImageFooTcl.obj : error LNK2001: unresolved external symbol "int
>>
>>__cdecl
>>
>>>vtkImageToImageFilterCppCommand(class vtkImageToImageFilter *,struct
>>
>>Tcl_Interp
>>
>>>*,int,char * * const)"
>>>(?vtkImageToImageFilterCppCommand@@YAHPAVvtkImageToImageFilter@@PAUTcl
>>>_Interp@@HQAPAD at Z)
>>>C:\programming\HybridRendering\vtkMy\bin\Debug/vtkmyImagingTCL.dll : fatal
>>
>>error
>>
>>>LNK1120: 1 unresolved externals
>>>Error executing link.exe.
>>>
>>>ALL_BUILD - 2 error(s), 0 warning(s)
>>>
>>>
>>>So, can anybody see what's wrong with this?

It looks like you've added a class to vtkMy/Imaging that derives from 
vtkImageToImageFilter.  When it is wrapped in Tcl, the wrapper tries to 
call the wrapper of the superclass, which is defined in vtkFilteringTCL, 
so you need to link to that library as well.

Please try editing vtkMy/Imaging/CMakeLists.txt and change this line:

   TARGET_LINK_LIBRARIES (vtkmyImagingTCL vtkmyCommonTCL vtkmyImaging)

to this:

   TARGET_LINK_LIBRARIES (vtkmyImagingTCL vtkmyCommonTCL vtkmyImaging
                          vtkFilteringTCL)

-Brad




More information about the vtkusers mailing list