[vtkusers] Cygwin library link dependencies for nightly build

Gregory Bleiker gregory.bleiker at phonak.ch
Mon Aug 19 08:31:56 EDT 2002


Dear all,

I'm trying to run a program with the static libraries I compiled with cygwin from the nightly sources. The build runs fine, but I can't get my program (that runs with VTK4.0) to link. The sequence of the "-lvtkxx" seems to be very important and "-lvktCommon" must be at the end. Is there a right way to do this? Do I have to run ranlib or ar or something of the kind to use these libraries? Any tools?
Here's what happens when I try to compile:

$ make -f Makefile.win
g++.exe qcview2.o vtktryout.res -o "vtktryout.exe" -L"E:\Dev-C++\lib" -L"E:\VTK\bin" -lvtkIO  -lvtkFiltering -lvtkGraphics    -l
vtkImaging -lvtkjpeg -lvtkpng -lvtkzlib -lvtkCommon -lvtkRendering -lopengl32 -I"E:\VTK\IO"  -I"E:\VTK\Common"  -I"E:\VTK\Filter
ing"  -I"E:\VTK"  -I"E:\VTK\Rendering"  -I"E:\VTK\Graphics"  -I"E:\VTK\Imaging"  -mwindows -static --verbose -s
Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/specs
gcc version 2.95.3-5 (cygwin special)

 /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/collect2.exe --subsystem windows -Bstatic --dll-search-prefix=cyg -o vtktryout.exe -s
/usr/lib/crt0.o -LE:\Dev-C++\lib -LE:\VTK\bin -L/usr/local/lib -L/usr/lib -L/usr/lib/w32api -L/usr/lib/gcc-lib/i686-pc-cygwin/2.
95.3-5 qcview2.o vtktryout.res -lvtkIO -lvtkFiltering -lvtkGraphics -lvtkImaging -lvtkjpeg -lvtkpng -lvtkzlib -lvtkCommon -lvtkR
endering -lopengl32 -lstdc++ -lgcc -lcygwin -lgdi32 -lcomdlg32 -luser32 -lkernel32 -ladvapi32 -lshell32 -lgcc

E:\VTK\bin/libvtkRendering.a(vtkRenderWindow.o)(.text+0x2177):vtkRenderWindow.cxx: undefined reference to `vtkWindow::CollectRevisions(ostream &)'
E:\VTK\bin/libvtkRendering.a(vtkRenderWindow.o)(.text+0x21bf):vtkRenderWindow.cxx: undefined reference to `vtkWindow::vtkWindow(void)'
E:\VTK\bin/libvtkRendering.a(vtkRenderWindow.o)(.text+0x23e3):vtkRenderWindow.cxx: undefined reference to `vtkWindow::~vtkWindow(void)'
E:\VTK\bin/libvtkRendering.a(vtkRenderWindow.o)(.text+0x24ed):vtkRenderWindow.cxx: undefined reference to `vtkWindow::~vtkWindow...

Thanks

Gregi




More information about the vtkusers mailing list