Luca Masera wrote: > Now, there are two, bigger, problems... > If I don't add to the project "fg_os.cxx" and "fg_os.hxx" I've got > many error from the linker that doesn't find the body of the > functions declared into them (clearly....). > If I add them, however, I've got a compiler error > (that I've found not so easy to solve...). > > This is the error reported, > > c:\Programmi\Microsoft Visual Studio .NET 2003\Vc7\include\stdlib.h(256): > error C2381: 'exit' : redefinition; __declspec(noreturn) differs > > and it's extensive description: > > compiling file: fg_os.cxx > c:\Programmi\Microsoft Visual Studio .NET 2003\Vc7\include\stdlib.h(256) : > error C2381: 'exit' : redefinition; __declspec(noreturn) differs > c:\Programmi\Microsoft Visual Studio .NET 2003\Vc7\include\GL\glut.h(146) : > see declaration of 'exit' > c:\Programmi\Microsoft Visual Studio .NET 2003\Vc7\include\ostream(604) : > fatal error C1903: unable to recover from previous error(s); stopping compilation > > There's a way to solve these problems? > I'm using Microsoft Visual Studio .NET 2003.
Hi Luca, I looked into my glut.h and found that around line 146 : #if defined(_WIN32) # ifndef GLUT_BUILDING_LIB #if _MSC_VER >= 1200 _CRTIMP __declspec(noreturn) void __cdecl exit(int); #else _CRTIMP void __cdecl exit(int); #endif # endif note the '#if _MSC_VER >= 1200' line and corresponding #else and #endif I can't remember if it is the original version or was modified by me ( I suspect the 2nd solution ) but I am able to compile fg_os.cxx with vc7.0 and vc7.1 without any problem -Fred _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel