[vtkusers] Compiling VTK with MinGW, fixes to CMake rules
Mathieu Malaterre
mathieu.malaterre at kitware.com
Wed Sep 14 15:41:42 EDT 2005
Kalle Pahajoki wrote:
> Mathieu Malaterre wrote:
>
>> Kalle,
>>
>> VTK is being compiled every night with the following ctest script:
>>
>> http://www.vtk.org/Testing/Sites/ARRAKIS.kitware/Win32-mingw/20050914-0300-Nightly/Notes.html
>>
>>
>> It does not involve any kind of modification neither in VTK source
>> nor in cmake source. Could you please tell us what commands you use to
>> create those problems ?
>
>
>
> I got the problems using the "Unix makefiles" build type in the
> CMakeSetup (CMake 2.0 patch 6).
>
> Could you clarify for a CMake neophyte, how does one use above mentioned
> script to compile VTK?
>
> So far, my compilation process has been:
> - cmakesetup
> - configure & generate
> - make
>
> Where does the mentioned script enter the picture?
Kalle,
Ok I think I browse through your email too quickly. First question
should be:
Can you build VTK out of the box using cmake or not ?
It looks like -IMHO- you are trying to do some windoze tricks to your
build whereas MINGW is supposed to provide a POSIX system. Therefore if
you use gcc on mingw and try to link :
gcc -shared -o bla.so -lfoo
Then the linker will search for a library name: 'libfoo.so' or
'libfoo.a', note that lib is a compulsory prefix in this case. As a side
note you cannot mix VS C++ libraries with g++ library since the c++ name
mangling is not compatible(*).
As for the -lgcc, I don't understand why you had to remove it. Worse
case it should generate some warning but not errors.
Also for ctest scripting I suggest you read:
http://www.cmake.org/Wiki/CMake_Scripting_Of_CTest
and
http://www.cmake.org/Wiki/CMake_Testing_With_CTest
HTH
Mathieu
(*)easily :)
More information about the vtkusers
mailing list