0

I'm compiling "Star Control Timewarp" from http://timewarp.sourceforge.net
The problem is the game requires a variable to be declared at the global scope that is already claimed by a file that appears to be a standard linux math library.

I've taken the liberty or specifying a few other errors I located here as well.
The scope of this question regards the global_scope/new_declaration/ambiguation problem. But I included a little extra for anyone that might know the game or what to do about it.

.../timewarp/src/twgui/utils.h: At global scope:
.../timewarp/src/twgui/utils.h:166: error: new declaration ‘int round(double)’
/usr/include/bits/mathcalls.h:310: error: ambiguates old declaration ‘double round(double)’

Timewarp also requires that several classes have their function declarations corrected as they use the form

class something
{
     something::function()
};

in stead of

class something
{
     something::function()
};

Timewarp also requests , which is evidently not provided by Allegro 4.2.*, but only as a backup to it's own functions. Omitting the line appears to resolve.
Well, that's easy enough to fix but omitting the ‘int round(double)’ from utils.h produces a wealth of compile errors. Furthermore, there are several instances where functions are declared in the form

void function();

But not seemingly specified elsewhere. As in "melee.h"'s videowindow class's lock(), unlock(), and deinit() functions, yielding the "undefined reference error.

  • Obviously, and contrary to what they claim on their site, it is **not** written in portable C++. Or, well, perhaps it was in 2006 when they last updated the code, but it is definitely not portable 7.5 years later when using a relatively modern compiler. Anyway, what is your question? I see none... – syam Oct 24 '13 at 00:27
  • I'd recommend [The Ur-Quan Masters](http://sc2.sourceforge.net/), hunam. – Kerrek SB Oct 24 '13 at 00:31
  • There was a header file with a variable declared outside the class scope as "int round(double)" that conflicted with "double round(double)" from a system header. How does this happen and why is ambiguating a header's member I didn't include so bad? The program won't run without the variable but it won't compile with the problem. – user2852086 Oct 24 '13 at 01:30
  • Ur-Quan Masters, Kerrek, appears to be already solved, thank you. I still would like to know why my global scope variable is conflicting with a system header file. – user2852086 Oct 24 '13 at 01:31

0 Answers0