[ITK] cross-compiling ITK function to Windows

Matt McCormick matt.mccormick at kitware.com
Mon Feb 1 13:55:40 EST 2016


Hi Andre,

When configuring the build for the ThresholdImage executable, make
sure to set the ITK_DIR CMake configuration variable to the
appropriate ITK build tree directory.  For example,

  cmake . -DCMAKE_TOOLCHAIN_FILE=./Toolchain-mingw32.cmake
-DCMAKE_INSTALL_PREFIX=/home/X/mingw-install -G "Unix Makefiles"
-DITK_DIR=/home/X/ITK-build

Hope this helps,
Matt

On Mon, Feb 1, 2016 at 12:39 PM, André Ribeiro <afs13 at imperial.ac.uk> wrote:
> Hi ITK community,
>
> I am trying to cross-compile an ITK code to windows from my linux machine,
> but without success.
>
> I am able to compile it if I use as the target system Linux (my machine) and
> the compilers x86_64-linux-gnu-gcc and x86_64-linux-gnu-g++ in the Toolchain
> cmake file.
>
> Yet, if i change the target system to Windows and the compilers to
> x86_64-w64-mingw32-gcc and x86_64-w64-mingw32-g++ the cmake runs without any
> problems but is unable to find any of the ITK libraries (I observed this by
> looking at the generated build.make file)
>
>
> Here goes the command line I am using for the cmake compilation:
>>
>> cmake . -DCMAKE_TOOLCHAIN_FILE=./Toolchain-mingw32.cmake
>> -DCMAKE_INSTALL_PREFIX=/home/X/mingw-install -G "Unix Makefiles"
>
>
> Here goes one of the lines of the build.make file when the linux target is
> used
>>
>> ThresholdImage:
>> /disk2/X/programs/InsightToolkit-4.8.2/ITK_4.8.2/lib/libITKIOTransformHDF5-4.8.so.1
>
>
> Here goes the same line in  the build.make file  if the Windows is used as
> target
>>
>> ThresholdImage.exe: ITKIOTransformHDF5-NOTFOUND
>
>
> Any help is appreciated.
>
>
> Regards,
> Andre Santos Ribeiro
>
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/mailman/listinfo/community
>


More information about the Community mailing list