[Insight-users] [IGSTK-Users] help on itk 3.20.1 vs2008 compilation needed

Aiden agongheli at 163.com
Wed May 9 00:02:41 EDT 2012



Hi, Özgür:

Thanks again for the help. I did compiled on my computer (x64, windows 7) without any error using the sln file (and build directory) generated on a x86 machine (a virtual machine, windows 7 32bit).

I still wanted it work on my native x64 computer. So I managed to manually set 
VXL_SIZEOF_SIZE_T to 4, as what I get from a x86 machine and passed the cmake error. 

However, when I compile on with vs 2008, I got a lot of errors, mostly the following error:

e:\development\insighttoolkit-3.20.1\utilities\vxl\vcl\emulation\vcl_limits.h(206) : error C2906: 'vcl_numeric_limits<int>' : explicit specialization requires 'template <>'
e:\development\insighttoolkit-3.20.1\utilities\vxl\vcl\emulation\vcl_limits.h(505) : error C2177: constant too big
E:\Development\InsightToolkit-3.20.1\Utilities\vxl\vcl\vcl_complex.h(66) : fatal error C1017: invalid integer constant expression
..\..\..\InsightToolkit-3.20.1\Utilities\itktiff\tif_win32.c(182) : error C2065: 'O_RDONLY' : undeclared identifier

Any ideas?

Thanks.

Aiden




At 2012-05-09 09:58:16,"Özgür Güler" <ozgur_guler at gmx.at> wrote:
>Hi Aiden,
>
>when I run following simple CMakeLists.txt
>
>----CMakeLists.txt
>cmake_minimum_required(VERSION 2.6)
>
>set(VXL_SIZEOF_SIZE_T 7)
>MATH(EXPR VXL_ADDRESS_BITS 8*${VXL_SIZEOF_SIZE_T} )
>message(${VXL_ADDRESS_BITS})
>----
>
>with CMake 2.8 and 2.6 it works fine and I get the result 56 as output.
>
>The error you get is reproducible if you comment the line where I set
>VXL_SIZEOF_SIZE_T  to 7.
>
>In ITKs CMakeLists.txt this means that this variable is not set, which
>causes the strange error message.
>ITK tries to set this variable one line above MATH(.... with
>
>check_type_size(size_t  VXL_SIZEOF_SIZE_T)
>
>this CMake command should set the variable VXL_SIZEOF_SIZE_T with 4
>(byte) or 8 (byte)
>it seems that this command does not set this variable.
>
>the following code snippet gives on my Laptop 32 (CMake 2.8, CMake 2.6)
>
>INCLUDE (${CMAKE_ROOT}/Modules/CheckTypeSize.cmake)
>#set(VXL_SIZEOF_SIZE_T 7)
>CHECK_TYPE_SIZE(size_t  VXL_SIZEOF_SIZE_T)
>MATH(EXPR VXL_ADDRESS_BITS 8*${VXL_SIZEOF_SIZE_T} )
>message(${VXL_ADDRESS_BITS})
>
>could you try that and post the result?
>
>Best,
>Özgür
>
>
>
>
>2012/5/8 Aiden <agongheli at 163.com>:
>> Hi,
>>
>> May I ask for help on the compilation of itk 3.20.1 using vs2008?
>>
>> If I use cmake 2.8.7, I got the same error when configuring:
>>
>> http://www.itk.org/pipermail/insight-users/2011-December/043132.html
>>
>> Then I switched to cmake 2.6.4, turned off BUILD_TESTING and BUILD_EXAMPLE,
>> I got a similar warning, as attached.
>>
>> In the end, I got a message of error, but without any red line. The "OK"
>> button is grayed. I guess it is the same error with cmake 2.8.7. I attached
>> the CMakeCache.txt, ITKBuildSettings.cmake, ITKConfig.cmake here.
>>
>> Thanks a lot for helping out.
>>
>> Regards,
>> Aiden
>>
>>
>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-users
>
>
>
>-- 
>*********************************************************************
>Dr. Dipl.-Ing. Özgür Güler, Bakk. techn. PhD
>Research Assistant
>4D-Visualization Laboratory
>Univ. ENT Clinic
>Innsbruck Medical University
>Anichstr. 35, A-6020 Innsbruck, Austria
>
>tel.: +43 512 504 23428, fax.: +43 512 504 25231
>
>voxelmaster.eu
>www.gueler.at
>*********************************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120509/09b92590/attachment.htm>


More information about the Insight-users mailing list