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

Freespace 2 code

This topic is 5077 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
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);


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