[vtkusers] VTK 5.0 , ITK 2.4.1 compile errors with cygwin gcc 3.4.4

Obada Mahdi omahdi at gmx.de
Wed Jul 5 08:40:16 EDT 2006


Hi Stefanie!

Stefanie Nowak wrote:
> of course I can send you the build output and the CMakeCache.txt. The 
> CMAKE_VERBOSE_MAKEFILE was disabled, but I changed this and compiled again.

Thanks for sending the build logs!  Unfortunately, the only thing that I 
can say for sure is that I have absolutely no idea what is going on.

The good news is that I have not been able to reproduce the problem, so 
it is actually possible to compile and link VTK using MinGW (using 
MinGW/MSYS, CMake 2.2.3 and VTK-5-0 from CVS -- maybe not exactly the 
same setting as yours, but should be close).

Here are some things that you could try:

 >>> I  integrated VTK as a project in eclipse and ran make from there.

 > Building CXX object Common/CMakeFiles/vtkCommon.dir/vtkAbstractArray.obj
 > c++.exe  -DvtkCommon_EXPORTS    -Wno-deprecated -mwin32 -mthreads [...]

1. From the build log and CMakeCache.txt it would appear that CMake did 
not record the compiler with its full path name.  I am not sure what 
"running make from Eclipse" actually boils down to on your system, so 
chances are that the wrong compiler and/or linker tools are chosen 
(maybe those from your Cygwin installation?), at least if you do not run 
make through a MSYS shell.

This is just a shot in the dark, but you could try to explicitly set 
these values in the CMake configuration:
CMAKE_CXX_COMPILER:FILEPATH=d:/MinGW/bin/c++.exe
CMAKE_C_COMPILER:FILEPATH=d:/MinGW/bin/gcc.exe


2. Fetch a more recent CMake version (2.4.2) from
http://www.cmake.org/HTML/Download.html
and use that instead.  Newer versions might choose a better set of 
linker flags.


3. I understand that you are using the "Unix Makefiles" generator; try 
the "MSYS Makefiles" generator instead.  You might have to get a recent 
CMake version for this option (which is probably a good idea, anyway).


If the problem remains, you might want to cross-post/follow-up to the 
cmake mailing list (http://www.cmake.org/mailman/listinfo/cmake), I am 
sure people there have far more experience with MinGW issues.

(I am curious, though, why things worked well with ITK -- did you also 
compile ITK for shared libraries, or static?)

If there are any questions, feel free to send me a note.


Regards

Obada



More information about the vtkusers mailing list