[vtkusers] linking vtk application, mingw

Bill Lorensen bill.lorensen at gmail.com
Thu Nov 27 23:38:26 EST 2008


So I guess you are not using cmake to build your example.

That said, you are missing many of the vtk libraries. Look in
C:\msys\1.0\lib\vtk-5.2 and see the other libraries there. You
probably need to list all of them.

Bill

On Thu, Nov 27, 2008 at 4:46 PM, c674 <c674332 at web.de> wrote:
>
> Hello,
>
> I'm trying to compile an application that runs fine on Linux on Windows
> (XP) using MinGW. Building (also with MinGW) and installing VTK itself
> went well. But when linking my application I get an endless (at least it
> didn't end withing minutes) list of undefined references:
>
> C:\Sph\pp>g++ main.o postprocessor.o -L C:\msys\1.0\lib\vtk-5.2
> -lvtkCommon -lvtkGraphics -lvtkRendering -lvtkHybrid
> postprocessor.o:postprocessor.cpp:(.text+0x2c0): undefined reference to
> `vtkData
> SetAttributes::GetScalars()'
> ...
> postprocessor.o:postprocessor.cpp:(.text$_ZN12vtkAlgorithm13GetOutputPortEv[vtkA
> lgorithm::GetOutputPort()]+0x15): undefined reference to
> `vtkAlgorithm::GetOutpu
> tPort(int)'
> C:\msys\1.0\lib\vtk-5.2/libvtkCommon.a(vtkObjectFactory.obj):vtkObjectFactory.cx
> x:(.text+0x44a): undefined reference to `vtksys::Directory::Directory()'
> ...
> (little longer example: http://codepad.org/TfX1fGaA not sure how long it
> will be available)
>
> I would be thankful for any hint on what could go wrong and on how to fix
> it.
> --
> View this message in context: http://www.nabble.com/linking-vtk-application%2C-mingw-tp20726011p20726011.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the 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