[Insight-users] SimpleITK Build Issues VS 2008 (x64)

Dan Mueller dan.muel at gmail.com
Fri Mar 30 17:43:47 EDT 2012


Hi Scott,

Sorry to hear you are experiencing issues with building the SimpleITK
C# wrappers.

I tried to use SimpleITKCSharpManaged.dll from
SimpleITK-0.4.0-CSharp-Win64-anycpu.zip in a Visual Studio 2008
project and experienced the same issue you described:
Could not load file or assembly 'SimpleITKCSharpManaged.dll' or one of
its dependencies. This assembly is built by a runtime newer than the
currently loaded runtime and cannot be loaded.

The issue is not that the assembly was built by Visual Study 2010
(which it was) but rather it was built to target the .NET 4.0 runtime.
AFAIK it should be possible to build with Visual Studio 2010 but to
target the .NET 2.0 runtime for example. That said, I am totally flat
out at the moment and don't know when I will get a chance to do
this... So you will probably get faster results if you build yourself.

The SimpleITK FAQ does say that Visual Studio 9 is currently problematic
    http://www.itk.org/Wiki/ITK_Release_4/SimpleITK/FAQ#Currently_Problematic
but looking at the SimpleITK dashboard
    http://open.cdash.org/index.php?project=simpleITK
I notice there is one Visual Studio 2008 (aka Visual Studio 9) build
(an x86 build), so it does seem possible to build SimpleITK with VS9.

Brad owns this build machine, so I've cc'd him. Hopefully he can
provide some advice on how to setup VS9 to support TR1/C99.

Cheers, Dan

On 31 March 2012 05:34, Scott Johnson <Scott.Johnson at neuwave.com> wrote:
> Hello,
>
>
>
> I’ve been attempting to use SimpleITK under Windows 7 (x64) and Visual
> Studio 2008 and CMake 2.8.5.  The goal is to use the C# wrappers.
>
>
>
> First, I downloaded SimpleITK-0.4.0-CSharp-Win64-anycpu.zip and attempted to
> add a reference to SimpleITKCSharpManaged.dll to my solution.  VS didn’t
> recognize the dll as being valid.  (Now I’m assuming that the dll was built
> against VS 2010 and isn’t backward compatible.)
>
>
>
> I then downloaded the source tree with the intent to build it myself.  (I’ve
> tried with both the source package from sourceforge and checking out the
> most recent code from GIT.)  I have been attempting to follow the directions
> at http://www.itk.org/Wiki/ITK_Release_4/SimpleITK/FAQ.
>
>
>
> When I first ran CMake I was given an error reading:
>
>
>
> CMake Error at CMakeLists.txt:117 (message):
>
> SimpleITK requires usage of C99 stdint.
>
> It may be available as an optional download for your compiler.
>
> Please see the FAQ for details and to see if your compiler is supported.
>
> http://www.itk.org/Wiki/ITK_Release_4/SimpleITK/FAQ#Do_I_need_to_download_an_optional_package_for_C99.3F
>
>
>
> I downloaded the Visual C++ 2008 Feature Pack Release via the link on the
> web site and attempted to install it.  It failed because the installer said
> that I didn’t have the proper features installed for the update.  I also
> grabbed the stdint.h file and copied it to the location called out in the
> directions.  I’ve searched for a 64 bit version of this feature pack with no
> luck.  I did find Microsoft Visual C++ 2008 Feature Pack Redistributable
> Package (x64) but that didn’t help.
>
>
>
> CMake continues to give me errors and I’ve tracked the initial error to a
> line in the CMakeLists.txt file which reads:
>
> check_include_file_cxx( stdint.h SITK_HAS_STDINT_H )
>
> I’ve been looking around to find out what paths are searched by
> check_include_file_cxx to no avail.  But evidently C:\Program
> Files\Microsoft Visual Studio 9/0\VC\include isn’t one of them.
>
>
>
> If possible I’d like to get this to work under VS 2008 and I’d appreciate
> any help I can get.  Right now I’m out of ideas as to what is going wrong.
>
>
>
> Thanks
>
>
>
>                                 -- Scott


More information about the Insight-users mailing list