[vtkusers] Problems compiling VTK4.0 on cygwin

piotr.kozaczewski at power.alstom.com piotr.kozaczewski at power.alstom.com
Thu Oct 10 03:19:37 EDT 2002


Dear all.

I tried to compile VTK on my PC runnning CYGWIN under WinNT 4.0.
After creating necessary libraries,
make starts building vtk, I suppose a tcl interpreter.

It uses the following command:

c++  -mwin32 tkAppInit.o  -L/cygdrive/c/VTK/bin -lgdi32 -lm -lvtkpng -lvtkzlib -
lvtkjpeg -lvtkImagingTCL -lvtkGraphicsTCL -lvtkIOTCL -lvtkFilteringTCL -lvtkComm
onTCL -lvtkIO -lvtkGraphics -lvtkImaging -lvtkFiltering -lvtkCommon -ltcl80 -lop
engl32 -ltk80 -lXt  -lSM -lICE  -L/usr/X11R6/lib -lX11 -lXext  -lvtkRenderingTCL
 -lvtkRendering -lvtkpng -lvtkzlib -lvtkjpeg -lvtkImagingTCL -lvtkGraphicsTCL -l
vtkFilteringTCL -lvtkCommonTCL -ltk80 -ltcl80 -lvtkImaging -lvtkGraphics -lvtkFi
ltering -lvtkCommon -lopengl32 -lm -lgdi32 -lXt  -lSM -lICE  -L/usr/X11R6/lib -l
X11 -lXext   -o /cygdrive/c/VTK/bin/vtk

and aborts , informing  about some missing Win32/OpenGL routines:

/cygdrive/c/VTK/bin/libvtkRendering.a(vtkWin32OpenGLRenderWindow.o)(.text+0x38b0
):vtkWin32OpenGLRenderWindow.cxx: undefined reference to `wglMakeCurrent at 8'
/cygdrive/c/VTK/bin/libvtkRendering.a(vtkWin32OpenGLRenderWindow.o)(.text+0x38c2
):vtkWin32OpenGLRenderWindow.cxx: undefined reference to `wglDeleteContext at 4'
/cygdrive/c/VTK/bin/libvtkRendering.a(vtkWin32OpenGLRenderWindow.o)(.text+0x3a4f
):vtkWin32OpenGLRenderWindow.cxx: undefined reference to `wglMakeCurrent at 8'
/cygdrive/c/VTK/bin/libvtkRendering.a(vtkWin32OpenGLRenderWindow.o)(.text+0x4f97
):vtkWin32OpenGLRenderWindow.cxx: undefined reference to `wglCreateContext at 4'
/cygdrive/c/VTK/bin/libvtkRendering.a(vtkWin32OpenGLRenderWindow.o)(.text+0x6985
):vtkWin32OpenGLRenderWindow.cxx: undefined reference to `wglCreateContext at 4'
/cygdrive/c/VTK/bin/libvtkRendering.a(vtkWin32OpenGLRenderWindow.o)(.text+0x6baf
):vtkWin32OpenGLRenderWindow.cxx: undefined reference to `wglDeleteContext at 4'
/cygdrive/c/VTK/bin/libvtkRendering.a(vtkWin32OpenGLImageWindow.o)(.text+0x1958)
:vtkWin32OpenGLImageWindow.cxx: undefined reference to `wglMakeCurrent at 8'
/cygdrive/c/VTK/bin/libvtkRendering.a(vtkWin32OpenGLImageWindow.o)(.text+0x1967)
:vtkWin32OpenGLImageWindow.cxx: undefined reference to `wglDeleteContext at 4'
/cygdrive/c/VTK/bin/libvtkRendering.a(vtkWin32OpenGLImageWindow.o)(.text+0x1f3e)
:vtkWin32OpenGLImageWindow.cxx: undefined reference to `wglMakeCurrent at 8'
/cygdrive/c/VTK/bin/libvtkRendering.a(vtkWin32OpenGLImageWindow.o)(.text+0x32a4)
:vtkWin32OpenGLImageWindow.cxx: undefined reference to `wglCreateContext at 4'
/cygdrive/c/VTK/bin/libvtkRendering.a(vtkWin32OpenGLImageWindow.o)(.text+0x32bc)
:vtkWin32OpenGLImageWindow.cxx: undefined reference to `wglMakeCurrent at 8'
/cygdrive/c/VTK/bin/libvtkRendering.a(vtkWin32OpenGLImageWindow.o)(.text+0x420d)
:vtkWin32OpenGLImageWindow.cxx: undefined reference to `wglCreateContext at 4'
/cygdrive/c/VTK/bin/libvtkRendering.a(vtkWin32OpenGLImageWindow.o)(.text+0x4225)
:vtkWin32OpenGLImageWindow.cxx: undefined reference to `wglMakeCurrent at 8'
/cygdrive/c/VTK/bin/libvtkRendering.a(vtkWin32OpenGLImageWindow.o)(.text+0x436a)
:vtkWin32OpenGLImageWindow.cxx: undefined reference to `wglMakeCurrent at 8'
/cygdrive/c/VTK/bin/libvtkRendering.a(vtkWin32OpenGLTextMapper.o)(.text+0x1652):
vtkWin32OpenGLTextMapper.cxx: undefined reference to `wglMakeCurrent at 8'
/cygdrive/c/VTK/bin/libvtkRendering.a(vtkWin32OpenGLTextMapper.o)(.text+0x16a9):
vtkWin32OpenGLTextMapper.cxx: undefined reference to `wglMakeCurrent at 8'
/cygdrive/c/VTK/bin/libvtkRendering.a(vtkWin32OpenGLTextMapper.o)(.text+0x195f):
vtkWin32OpenGLTextMapper.cxx: undefined reference to `wglUseFontBitmapsA at 16'
collect2: ld returned 1 exit status
make[3]: *** [/cygdrive/c/VTK/bin/vtk] Error 1
make[2]: *** [default_target] Error 2
make[1]: *** [default_target_Wrapping_Tcl] Error 2
make: *** [default_target] Error 2

My Makefile has been automatically generated by CMake:
(See attached file: Makefile)
Beyond standard CMake settings for VTK, I required:
*) Build of examples.
*) Build of the Tcl embedding.

I also manually modified CMakeCache.txt to enable finding Tcl/Tk include
files, downloaded from www.cygwin.com .
(See attached file: CMakeCache.txt)(See attached file:
CCMakeSystemConfig.cmake)

I would like to use (native?) OpenGL and not XFree85_for_cygwin.

I use WinNT4.0, cygwin with gcc/g++ v.2.95.3-5, VTK4.0

Would you mind giving me some help/hints etc?
Thank you very much in advance.

Best regards,
Piotr Kozaczewski
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile
Type: application/octet-stream
Size: 25173 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20021010/82dab5f4/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CMakeCache.txt
Type: application/octet-stream
Size: 24990 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20021010/82dab5f4/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CCMakeSystemConfig.cmake
Type: application/octet-stream
Size: 5150 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20021010/82dab5f4/attachment-0002.obj>


More information about the vtkusers mailing list