[vtk-developers] cygwin build problems
Brian Spiegel
hive0 at hotmail.com
Mon Feb 7 22:22:00 EST 2005
I have been using cygwin for a while and when trying to build vtk it I have
run into these errors
Building shared library /home/Hive/VTKBuild/bin/libvtkRendering.dll...
Building object file vtkTkRenderWidget.o...
In file included from ../../VTK/Rendering/tkInternals/tk84/tkPort.h:27,
from ../../VTK/Rendering/tkInternals/tk84/tkInt.h:27,
from ../../VTK/Rendering/tkInternals/tk84/tkWinInt.h:21,
from ../../VTK/Rendering/vtkTkRenderWidget.cxx:34:
../../VTK/Rendering/tkInternals/tk84/tkWinPort.h:45:19: tchar.h: No such
file or
directory
../../VTK/Rendering/tkInternals/tk84/tkWinPort.h:58:1: warning: "OPEN_MAX"
redef
ined
In file included from
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/include/limits.h:122
,
from
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/include/syslimits.h:
7,
from
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/include/limits.h:11,
from /usr/include/c++/3.3.3/climits:49,
from /usr/include/c++/3.3.3/bits/stl_algobase.h:66,
from /usr/include/c++/3.3.3/memory:54,
from /usr/include/c++/3.3.3/string:48,
from /usr/include/c++/3.3.3/bits/locale_classes.h:47,
from /usr/include/c++/3.3.3/bits/ios_base.h:47,
from /usr/include/c++/3.3.3/ios:49,
from /usr/include/c++/3.3.3/ostream:45,
from /usr/include/c++/3.3.3/iostream:45,
from ../../VTK/Common/vtkIOStream.h:34,
from ../../VTK/Common/vtkSystemIncludes.h:49,
from ../../VTK/Common/vtkIndent.h:27,
from ../../VTK/Common/vtkObjectBase.h:46,
from ../../VTK/Common/vtkObject.h:44,
from ../../VTK/Common/vtkWindow.h:29,
from ../../VTK/Rendering/vtkRenderWindow.h:44,
from ../../VTK/Rendering/vtkTkRenderWidget.h:35,
from ../../VTK/Rendering/vtkTkRenderWidget.cxx:20:
/usr/include/limits.h:143:1: warning: this is the location of the previous
defin
ition
../../VTK/Rendering/vtkTkRenderWidget.cxx: In function `LRESULT
vtkTkRenderWidgetProc(HWND__*, unsigned int, unsigned int, long int)':
../../VTK/Rendering/vtkTkRenderWidget.cxx:800: error: invalid use of
undefined
type `struct _XDisplay'
/usr/include/X11/Xlib.h:289: error: forward declaration of `struct
_XDisplay'
make[3]: *** [vtkTkRenderWidget.o] Error 1
make[2]: *** [default_target] Error 2
make[1]: *** [default_target_Rendering] Error 2
make: *** [default_target] Error 2
Now to build vtk Im using this help file
http://www.mit.edu/~sylvain/vtk-itk-cygwin.pdf
But instead of using cygwin to download them I downloaded myself and put
them into the appropriate directories.
With these changes I dont get it and I have tried it twice from scratch
1. Compile GL2PS
cd gl2ps-1.2.3
g++ -c gl2ps.c
ar rc libgl2ps.a gl2ps.o
ranlib libgl2ps.a
cd ~
mkdir gl2psBuild
mv gl2ps-1.2.3/gl2ps.o gl2psBuild
mv gl2ps-1.2.3/libgl2ps.a gl2psBuild
2. Install CMake
mkdir CMakeBuild
cd CMake
./configure --prefix=../CMakeBuild
Use Esc and d to delete characters.
CMAKE_CXX_FLAGS:STRING=-Wall -pedantic
CMAKE_C_FLAGS:STRING=-Wall -pedantic
CMAKE_USE_RELATIVE_PATHS:BOOL=ON
./configure --prefix=../CMakeBuild
cd ~/CMakeBuild
cmake ../CMake
cd ~/CMake
make
make install
cd ~
vi .bashrc
export PATH=/home/Hive/CMakeBuild/bin:$PATH
source .bashrc
3. Install VTK
cd ~
mkdir Build
mkdir VTKBuild
cd VTKBuild
cmake ../VTK
vi CMakeCache.txt
BUILD_EXAMPLES:BOOL=ON
BUILD_SHARED_LIBS:BOOL=ON
CMAKE_CXX_FLAGS:STRING=-Wall -pedantic
CMAKE_C_FLAGS:STRING=-Wall -pedantic
CMAKE_INSTALL_PREFIX:PATH=/home/Hive/Build
CMAKE_USE_RELATIVE_PATHS:BOOL=ON
VTK_USE_GL2PS:BOOL=ON
VTK_USE_HYBRID:BOOL=ON
VTK_USE_PATENTED=ON
VTK_WRAP_TCL:BOOL=ON
cmake ../CMake
Search tkWinInt.h in your Cygwin home dir and set the file path in
CMakeCache.txt
vi CMakeCache.txt TK_INTERNAL_PATH:PATH=/usr/src/tcltk-20030901-1/tk/win
//What is the path where the file tkWinInt.h can be found
TK_INTERNAL_PATH:PATH=/home/Hive/VTK/Rendering/tkInternals/tk84
cmake ../CMake
make
More information about the vtk-developers
mailing list