1 (edited by kookwi 27-10-2010 17:28:48)

Topic: Too many error with cstdio (VC2008)

I follow this document.  http://www.oofem.org/wiki/doku.php?id=w … ompilation

But I have around 30,000 error with cstdio, for example like follow.
-----------------------------------------------------------------------------------------------------------------------------------
c:\program files\microsoft visual studio 9.0\vc\include\cstdio(39) : error C2143: syntax error : missing '{' before ':'
-----------------------------------------------------------------------------------------------------------------------------------

of course, I set the "Compile As" to "/TP option", but I'm not sure what's mean
"Make sure, that you set this option for all targets"

I read one answer about this. In that solution, he said
-----------------------------------------------------------------------------------------------------------------------------------
The point is that the, despite of the /TP compilation setting (referring to the wiki post) set in the project properties, the C files have the /TC option. I changed this for all c files.
-----------------------------------------------------------------------------------------------------------------------------------

So, I can't understand this sentence "I changed this for all c files"

And that kind of error are from "compile option"?

2

Re: Too many error with cstdio (VC2008)

Hi,
the "/TP" option will force the compiler to recognize the file as c++ instead of plain c. This is needed, because the visual studio compiler treats all *.c and *.C files as plain c files.

In the project settings, the "/TP" option has to be set for all targets, usually named Debug and Release. I also suggest to check the compilation log to see, if "/TP" option has been correctly passed to compiler.

Borek