[vtkusers] VTK and Qt, static build - CORRECTION
André Prins
a.h.prins at gmail.com
Tue Sep 21 13:39:33 EDT 2010
Hi Gib,
At the moment I have a static Vtk (5.6.0) with a dynamic Qt
(4.7.0-beta2) on Windows with MinGW (GCC 4.5.0) and this works without
any problems. I do not specify explicitly that I use a static Vtk,
although this may be hidden in the UseVtk cmakefile.
In my CMakeLists.txt, I simply do the following:
find_package( VTK REQUIRED HINTS $ENV{VTKDIR} )
include( ${VTK_USE_FILE} )
# ... and further down specifying the link-libraries
target_link_libraries( MyFilters vtkImaging vtkGraphics vtkIO )
Do you use cmake for your own project as well? Which "undefined
references" are missing?
Regards,
Andre
On Tue, Sep 21, 2010 at 3:07 AM, Gib Bogle <g.bogle at auckland.ac.nz> wrote:
> Sorry, I made a mistake. I did 'make clean' and re-generated the make files
> with cmake, then did make again. Now the VTK library files have the correct
> symbols (no "_imp___" prefixes). I'm not sure what my mistake was before,
> probably not cleaning something.
>
> Anyway, the problem with the app linker remains, many "undefined references"
> to the VTK symbols prefixed by "_imp___". Presumably I need a way to tell
> the IDE (which is QtCreator) to expect static versions of the library
> symbols. I'm not sure whether this is a compile or a link issue. I realize
> that this is now a Qt issue.
>
> BTW this is all Windows with MinGW.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
More information about the vtkusers
mailing list