Archived

This topic is now archived and is closed to further replies.

darkchrono4

Freespace 2 code

Recommended Posts

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.

Share this post


Link to post
Share on other sites
What compiler are you using? Look up the error code (C2383) and see what causes it. Then go from there.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites