N
NvrBst
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.
In Unix I go "./configure" and it makes a "Makefile". I then do
"make" and when thats done I do "make install".
Is there some way to easily get this type of project working in VC++
2008? I do "New > Project From Exsisting Code > Use VIsual Studio:
Console application". And I give it the Include folder that comes
with the program.
When I try to compile I get about 75 errors. Mostly all are
duplicates but is there some kind of switch I should be setting so
that VC++ 2008 will compile ANSI C source?
50% of the errors are these:
error C2054: expected '(' to follow 'inline'
error C2085: 'imax' : not in formal parameter listError
error C2143: syntax error : missing ';' before '{'
The 3 errors point to the same inline function which is (the project
uses about 10 of these functions all getting the same errors)
static inline int imax(int a, int b) {
return a > b ? a : b;
}
and its found in a header file. Anyone know how I fix this? Or would
need more information?
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?
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
Thanks, NB
(they compile with GNU) and want to get them to compile in VC++ 2008.
In Unix I go "./configure" and it makes a "Makefile". I then do
"make" and when thats done I do "make install".
Is there some way to easily get this type of project working in VC++
2008? I do "New > Project From Exsisting Code > Use VIsual Studio:
Console application". And I give it the Include folder that comes
with the program.
When I try to compile I get about 75 errors. Mostly all are
duplicates but is there some kind of switch I should be setting so
that VC++ 2008 will compile ANSI C source?
50% of the errors are these:
error C2054: expected '(' to follow 'inline'
error C2085: 'imax' : not in formal parameter listError
error C2143: syntax error : missing ';' before '{'
The 3 errors point to the same inline function which is (the project
uses about 10 of these functions all getting the same errors)
static inline int imax(int a, int b) {
return a > b ? a : b;
}
and its found in a header file. Anyone know how I fix this? Or would
need more information?
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?
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
Thanks, NB