[vtkusers] creating a dll with CMake for a VTK project

Prathamesh Kulkarni prathameshmkulkarni at gmail.com
Mon Jul 19 12:08:15 EDT 2010


Hello all,

I have a my project which uses VTK (and ITK and Qt). Now I need to deploy
this project to other machines. For that, I figured out I need to have a
.dll and not a .lib for my project. For that, I added the following line to
my CMakeLists.txt file:

ADD_LIBRARY(MyLib SHARED ${SRCS} ${HDRS})

However, this gives me a slew of errors in the .obj files. They look
something like: "public: class vtkImageData * __thiscall
vtkImageAlgorithm::GetOutput(void)" (?GetOutput at vtkImageAlgorithm
@@QAEPAVvtkImageData@@XZ)


Could someone please help me to figure out a way to allow visual studio to
build a library for me?

Is there a better way to do this?

I need to figure this out before my deployment deadline :-)


Any help will be highly appreciated.

Thanks,
Prathamesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100719/ed279373/attachment.htm>


More information about the vtkusers mailing list