[Insight-users] Re: I can't build ITK and VTK in Visual Studio 8

Aron Helser helser at 3rdtech.com
Mon Feb 11 16:05:54 EST 2008


Hi Seki,

It looks like Visual C++ is trying to compile your program as a C 
program, instead of a C++ program. There are two things you can do:
- rename your source with the extension ".cpp" - then visual studio will 
automatically compile as a C++ file.
- Change the project settings to force C++ compilation: Project 
Properties, Configuration Properties, C/C++, Advanced, change 'Compile 
As' to Compile as C++ code

Hope this helps,
Aron
> Date: Mon, 11 Feb 2008 06:30:02 -0800 (PST)
> From: Seki <sekanell at gmail.com>
> Subject: [Insight-users] I can't build ITK and VTK in Visual Studio 8
> To: insight-users at itk.org
> Message-ID: <15411373.post at talk.nabble.com>
> Content-Type: text/plain; charset=us-ascii
>
>
> Hi,
>
> I'm new using ITK and VTK libraries, and I have some problems trying to
> build them. I've different kind of errors:
>
> (what I am trying to build is the solution ITK.sln with all sample
> projects).
>
> 1>C:\Archivos de programa\Microsoft Visual Studio 8\VC\include\cstddef(18) :
> error C2143: syntax error : missing '{' before ':'
>
> refering to the line: 
> using ::ptrdiff_t; using ::size_t;
>
> /////////////////////////////////////////
>
> 1>C:\Archivos de programa\Microsoft Visual Studio 8\VC\include\cstddef(18) :
> error C2143: syntax error : missing '{' before ':'
>
> refering to the line: 
> using ::ptrdiff_t; using ::size_t;
>
> /////////////////////////////////////////
>
> 3>.\gdcmException.cxx(57) : error C3861: 'exit': identifier not found
>
> refering to line:
> exit(-1);
>
> /////////////////////////////////////////
>
> 1>C:\Archivos de programa\Microsoft Visual Studio 8\VC\include\eh.h(30) :
> fatal error C1189: #error :  "eh.h is only for C++!"
>
> refering to the lines:
>
> #ifndef __cplusplus
> #error "eh.h is only for C++!"
> #endif
>
> I suppose that all this errors are related to C++ version or Visual Studio
> config., but I can't sove them.
>
> Can anybody help me?
>
> Josep.
>   


More information about the Insight-users mailing list