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

Seki sekanell at gmail.com
Wed Feb 13 06:28:22 EST 2008


Hi,

The property "Compile As" was set to C++, so it is not the problem.
I changed the extension of all files to .cpp (they had .cxx extension) and
the result is the same, same errors.

Thanks for your reply but none of the two solutions propposed can't solve
the errors.

If anybody has any other solution please let me know! 

Thanks.



Aron Helser wrote:
> 
> 
> 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.
>>   
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
> 
> 

-- 
View this message in context: http://www.nabble.com/I-can%27t-build-ITK-and-VTK-in-Visual-Studio-8-tp15411373p15455619.html
Sent from the ITK - Users mailing list archive at Nabble.com.



More information about the Insight-users mailing list