[vtkusers] Cross compiling VTK for Windows from Linux

Alessandro Re ale.re.jobs at gmail.com
Tue Jan 14 05:27:26 EST 2014


Hello,
I am just starting using VTK, using a package manager to get it installed
under Linux (so, no experience compiling VTK from sources).

But I need now to cross-compile Qt+VTK applications from Linux to Windows.

I've a working environment for cross-compiling Qt applications using mingw.
I tried configuring VTK with CMake, specifying mingw C/C++ compilers, but
the configuration process fails.

Here's an excerpt from CMakeError.log


Determining if the C compiler works failed with the following output:
Change Dir: /home/reale/Resources/vtk-build-mingw32/CMakeFiles/CMakeTmp

Run Build Command:/usr/bin/gmake "cmTryCompileExec161676170/fast"
/usr/bin/gmake -f CMakeFiles/cmTryCompileExec161676170.dir/build.make
CMakeFiles/cmTryCompileExec161676170.dir/build
gmake[1]: Entering directory
`/home/reale/Resources/vtk-build-mingw32/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report
/home/reale/Resources/vtk-build-mingw32/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec161676170.dir/testCCompiler.c.o
/usr/bin/i686-w64-mingw32-gcc    -o
CMakeFiles/cmTryCompileExec161676170.dir/testCCompiler.c.o   -c
/home/reale/Resources/vtk-build-mingw32/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTryCompileExec161676170
/usr/bin/cmake -E cmake_link_script
CMakeFiles/cmTryCompileExec161676170.dir/link.txt --verbose=1
/usr/bin/i686-w64-mingw32-gcc
CMakeFiles/cmTryCompileExec161676170.dir/testCCompiler.c.o  -o
cmTryCompileExec161676170 -rdynamic
i686-w64-mingw32-gcc: error: unrecognized command line option '-rdynamic'
gmake[1]: *** [cmTryCompileExec161676170] Error 1
gmake[1]: Leaving directory
`/home/reale/Resources/vtk-build-mingw32/CMakeFiles/CMakeTmp'
gmake: *** [cmTryCompileExec161676170/fast] Error 2


I do not know how to proceed. Can someone please help me?
Thanks in advance

Alessandro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140114/1fbfcd09/attachment.html>


More information about the vtkusers mailing list