> I'm not too much of a C++ programmer but I have a bunch of C programs
> (they compile with GNU) and want to get them to compile in VC++ 2008.
[quoted text clipped - 23 lines]
> return a > b ? a : b;
> }
That's C99 code - VC++ does not support C99 (other than a few things, like
long long).
> and its found in a header file. Anyone know how I fix this? Or would
> need more information?
You'll need to modify the code to make it valid C89 or valid C++ 98. To
compile all the code as C++, rename the files .cpp instead of .c - that
could solve some of your problems, and/or create many more.
> Note: The project basically compiles two DLL files in a src folder and
> then compiles a EXE in the examples folders (which links the 2
> DLL's). There is only about 300KBs of source files.
>
> I also see a "Makefile project" in VC++ 2008, but I don't know how to
> use this, or if it'd even be usefull for me?
It's not - ignore it.
> Basically if any one has any pointers a general outline on how I can
> get C ANSI to compile in VC++ 2008 I'd be very greatful :)
You're on the right track - it looks like it's just the lack of C99
compatibility that's tripping you up.
-cd
NvrBst - 29 Feb 2008 19:27 GMT
On Feb 28, 10:11 pm, "Carl Daniel [VC++ MVP]"
<cpdaniel_remove_this_and_nos...@mvps.org.nospam> wrote:
> > I'm not too much of a C++ programmer but I have a bunch of C programs
> > (they compile with GNU) and want to get them to compile in VC++ 2008.
[quoted text clipped - 52 lines]
>
> - Show quoted text -
Ahh thank you :) I changed them to cpp and then it complained about
no "stdbool.h" which I commented out and added my own "fmax(double,
double)" function, and now it compiles :) I'll try some of the others
now :)
Thanks Again