[vtkusers] Problems compiling VTK 4 under cygwin with shared libs
Carl Hetherington
lists at carlh.net
Wed Dec 19 09:59:21 EST 2001
Hi,
Fresh from my success at building a static VTK 4 (CVS checkout) under
cygwin, I am now trying to do the same thing using shared libraries.
>From a clean CVS checkout, I run
cmake -i
and answer YES to the "Enable shared libraries" question
I then run make and it bombs out with
... stuff ...
c++ -g -O2 -mwin32 -o \
/usr/local/src/VTK/CVS-nightly/VTK/bin/libvtkzlib \
adler32.o gzio.o inftrees.o uncompr.o compress.o infblock.o infutil.o
zutil.o crc32.o infcodes.o deflate.o inffast.o inflate.o trees.o
-L/usr/local/src/VTK/CVS-nightly/VTK/bin/ -lpthread -lm
/usr/lib/libpthread.a(libcmain.o)(.text+0x6a): undefined reference to
`WinMain at 16'
collect2: ld returned 1 exit status
make[3]: *** [/usr/local/src/VTK/CVS-nightly/VTK/bin/libvtkzlib] Error 1
make[3]: Leaving directory
`/usr/local/src/VTK/CVS-nightly/VTK/Utilities/zlib'
make[2]: *** [build_zlib] Error 2
make[2]: Leaving directory `/usr/local/src/VTK/CVS-nightly/VTK/Utilities'
make[1]: *** [build_Utilities] Error 2
make[1]: Leaving directory `/usr/local/src/VTK/CVS-nightly/VTK'
make: *** [default_target] Error 2
The fact that it looks for WinMain suggests that it is trying to link
libvtkzlib as an executable, which seems wrong to me.
Do I have to change other things in order to get it to build with cygwin?
I thought it was cmake's job to take care of all the details so that VTK
builds out-of-the-box; if this is the case, I will try to work out some
patches to the build scripts.
Thanks in advance to anyone who can clear my misunderstandings!
Carl
More information about the vtkusers
mailing list