Jeffrey Tan[MSFT] wrote:
> In additionally, this C/C++ compiler option can be specified in Project
> Setting dialog->C/C++->Advanced->"Compile As".
Jeffrey:
In my experience (in 2003.NET) this does not work, at least in my
situation. I had an existing C++ project, to which I wanted to add a
bunch. of .c files, and compile them as C++. I was not the owner of
these files, so I did not want to change the extension (which I would
probably have done otherwise). The setting you mention was already set
to C++, but the added files compiled as C, and it seemed I had to change
each one. In the new VStudio IDE this is very painful because you have
to open the Properties dialog separately for each file.
David Wilkinson
"Jeffrey Tan[MSFT]" - 20 Apr 2006 03:14 GMT
Hi David,
However, in my VS.net2003 project, if I added a test.c file in the project,
then add the following code to the file:
#include <stdio.h>
typedef struct _S1 {
int data;
int text;
} S1;
int test1()
{
printf("Hello, Vorbis!\n");
S1 oy;
return 1;
}
With that compiler option set to C++, it will compile without any problem.
It will only generate error when setting the compiler to C style.
Can you please give it a re-check? Thanks
Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.