[Insight-users] cross compiling ITK with mingw32
Tom Vercauteren
tom.vercauteren at m4x.org
Tue Nov 24 07:31:28 EST 2009
Hi Mario,
For your information, the Float.h vs. float.h patch has been committed
to both the ITK tree and in upstream VXL:
http://www.itk.org/cgi-bin/viewcvs.cgi/Utilities/vxl/core/vnl/vnl_math.cxx?root=Insight&r1=1.20&r2=1.21&sortby=date
http://vxl.svn.sourceforge.net/viewvc/vxl/trunk/core/vnl/vnl_math.cxx?r1=27007&r2=27047&sortby=date
Regards,
Tom
On Wed, Nov 11, 2009 at 11:30, Tom Vercauteren <tom.vercauteren at m4x.org> wrote:
> Great. Thanks for the update. I guess the next step would be to
> automate that. This will require getting rid of the tryrun in the
> CMakeLists and could rely on wine to run the unit tests from the
> source machine.
>
> I have added this to the ITK 4.0 wishlist:
> http://www.itk.org/Wiki/ITK_Release_4.0#Architecture_and_Software_engineering
>
> Tom
>
> On Wed, Nov 11, 2009 at 10:53, Mario Ceresa <mario.ceresa at torrescalla.it> wrote:
>> Hello Tom,
>> everything went fine with cross compiling ITK for a windows target.
>>
>> The steps I used to build were:
>>
>> - Download sources and put them in Insight_src
>> - Create Insight_mingw32.cmake initial cache file.
>> To build it I copied all the cmTryCompileExec-*.exe test files to the
>> target machine, executed and copied the results in the cache file.
>> You'll find it attached but I'm not sure if it will apply to your
>> configuration too!
>>
>> - Create the toolchain file. You'll find mine attached but, again,
>> you'll probably have to fix it for your system.
>>
>> - Go to the build dir and do:
>> ccmake -C ../Insight_mingw32.cmake
>> -DCMAKE_TOOLCHAIN_FILE=../Toolchain-mingw32.cmake ../Insight_src
>>
>> - then configure and make as usually
>>
>> That's all!
>>
>> Mario
>>
>>
>> On Tue, Nov 10, 2009 at 6:44 PM, Mario Ceresa
>> <mario.ceresa at torrescalla.it> wrote:
>>> Hi Tom,
>>> thanks for your answer: I changed to <float.h> and it seems to be
>>> working (compilation is at 68% right now)!
>>>
>>> When it finishes, I'll test it onto the target machine and keep you informed :)
>>>
>>> Regards,
>>>
>>> Mario
>>>
>>> On Tue, Nov 10, 2009 at 5:48 PM, Tom Vercauteren
>>> <tom.vercauteren at gmail.com> wrote:
>>>> Hi Mario,
>>>>
>>>> I never tried to compile the entire ITK with mingw from linux. However
>>>> from my small linux mingw experience, I saw that mingw is case
>>>> sensitive on linux but not on windows. Did you try replacing
>>>> Float.h
>>>> by
>>>> float.h
>>>> ?
>>>>
>>>> Hope this helps,
>>>> Tom
>>>>
>>>> P.S.: Let me know if you manage to cross-compile all of it. This is
>>>> something I wanted to try at some point.
>>>>
>>>> On Tue, Nov 10, 2009 at 17:27, Mario Ceresa <mario.ceresa at torrescalla.it> wrote:
>>>>> Hi everybody!
>>>>>
>>>>> I'd like to use a program written with ITK on a win machine where I am
>>>>> not the admin and cannot install Visual C++. So I'm trying to
>>>>> cross-compile ITK with mingw32 on a Fedora 10 64bit.
>>>>>
>>>>> Thanks to the info at http://www.itk.org/Wiki/CmakeMingw, I was able
>>>>> to build simple programs which run on the target.
>>>>>
>>>>> When I tried to compile ITK's "Hello world" cmake complained that the
>>>>> program and ITK didn't use the same compiler.
>>>>> So I reconfigured ITK itself with cmake (with mingw32 toolchain file),
>>>>> manually modified all the TRY_RUN variables after executing the test
>>>>> programs on the target, and tried to build it.
>>>>>
>>>>> It stopped with errors:
>>>>>
>>>>> Scanning dependencies of target itkvnl
>>>>> [ 26%] Building CXX object
>>>>> Utilities/vxl/core/vnl/CMakeFiles/itkvnl.dir/vnl_alloc.obj
>>>>> [ 26%] Building CXX object
>>>>> Utilities/vxl/core/vnl/CMakeFiles/itkvnl.dir/vnl_block.obj
>>>>> [ 26%] Building CXX object
>>>>> Utilities/vxl/core/vnl/CMakeFiles/itkvnl.dir/vnl_math.obj
>>>>> Download/Insight/Utilities/vxl/core/vnl/vnl_math.cxx:13:48: error:
>>>>> Float.h: No such file or directory
>>>>> make[2]: *** [Utilities/vxl/core/vnl/CMakeFiles/itkvnl.dir/vnl_math.obj] Error 1
>>>>> make[1]: *** [Utilities/vxl/core/vnl/CMakeFiles/itkvnl.dir/all] Error 2
>>>>> make: *** [all] Error 2
>>>>>
>>>>> So I have the following questions:
>>>>> 1) Does anyone know why I'm missing Float.h?
>>>>> 2) Is there any better/simpler/reccomended way to cross compile itk
>>>>> for a windows machine?
>>>>>
>>>>> I tried googling for a while but with no luck!
>>>>>
>>>>> Thanks and regards,
>>>>>
>>>>> Mario
>>>>> _____________________________________
>>
>
More information about the Insight-users
mailing list