[Insight-users] Errors while cross-compiling with mingw in Linux

Yulia.Arzhaeva at csiro.au Yulia.Arzhaeva at csiro.au
Mon Aug 10 04:14:52 EDT 2009


Hi,

I've been trying to cross-compile ITK for Windows using Mingw. The host platform is Linux Suse.
Generating build files using cmake and a toolchain file went okay, with the exception of TRY_RUN errors, which is understandable.
However, when I started compilation of ITK, I ran into a problem that seems unresolvable to me.
ITK compilation seems to include compiling and then running several executables, such as itksysEncodeExecutable, itksysProcessFwd9x.exe.
Since I am cross-compiling for another platform, these executable cannot be run on the host platform. These is the compilation error I've got:

Scanning dependencies of target itksysEncodeExecutable
[  0%] Building C object Utilities/kwsys/CMakeFiles/itksysEncodeExecutable.dir/EncodeExecutable.obj
Linking C executable ../../bin/itksysEncodeExecutable.exe
[  0%] Built target itksysEncodeExecutable
Scanning dependencies of target itksysProcessFwd9x
[  0%] Building C object Utilities/kwsys/CMakeFiles/itksysProcessFwd9x.dir/ProcessFwd9x.obj
Linking C executable ../../bin/itksysProcessFwd9x.exe
[  0%] Built target itksysProcessFwd9x
[  1%] Generating itksysProcessFwd9xEnc.c
/bin/sh: ../../bin/itksysEncodeExecutable.exe: cannot execute binary file
make[2]: *** [Utilities/kwsys/itksysProcessFwd9xEnc.c] Error 126
make[1]: *** [Utilities/kwsys/CMakeFiles/itksys.dir/all] Error 2
make: *** [all] Error 2

Maybe, there is a solution to it? Maybe, I need to exclude those files from the compilation process, compile them separately beforehand with gcc?
Any adice will be appreciated. 

Yulia Arzhaeva
CSIRO Mathematical and Information Sciences


More information about the Insight-users mailing list