Skip to main content
gamedev.net
🔒 Locked

Freespace 2 code

Started by darkchrono4 Jan 5, 2004 at 11:14 PM 5 replies 1.3k views
Original Post
darkchrono4
darkchrono4
I know this has probably been asked before. And I would just search for it, but like usual the search function does not work at this time. I downloaded the Freespace 2 source code and am trying to get it to compile. But I keep getting errors like these c:\Downloads\Fs2\source\code\Graphics\2d.h(401): error C2383: ''screen::gf_set_palette'' : default-arguments are not allowed on this symbol. I''ve set the output directory to my Freespace 2 installation. But I''m not quite sure what I''m doing wrong.
Deebo
Deebo
What compiler are you using? Look up the error code (C2383) and see what causes it. Then go from there.
Lazzar
Lazzar
like wild_pointer said:

from msdn:
Visual C++ Concepts: Building a C/C++ Program

Compiler Error C2383
''symbol'' : default-arguments are not allowed on this symbol

The C++ compiler does not allow default arguments on pointers to functions.

This code was accepted by the previous version''s compiler but now gives an error. For code that works in all versions of Visual C++, do not assign a default value to a pointer-to-function argument.

For more information, see Summary of Compile-Time Breaking Changes.

The following line generates C2383:

// C2383.cpp
// compile with: /c
void (*pf)(int = 0); // C2383
// try the following line instead
// void (*pf)(int);


Lazzar
---------------------------------------------------------if god gave us the source code, we could change the world!
darkchrono4
darkchrono4
Thats nice, I guess I shouldn''t have thought that .Net 2003 was backwards compatiable with VS6. Basically its a bad thing to be have default arguments to pointers to functions?
darkchrono4
darkchrono4
I''ve got a question related to my first one. I removed all the default arguements and the pointers that were giving me a problem and now most of the code compiles. But it seems that the actual functions in the program that use the pointers are overloaded. The functions don''t include the arguments that were predefined in the header files. Is there anyway I can get around this or am I going to have to manually give all those functions the correct number of arguments?
Deebo
Deebo
You have to manually do each and every last one

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.