While attempting to compile Machinations 0.34
the makefile assumed nonstandard placement of a
specific (and outdated) version of the c++ stl, so it
needed to be altered to point to the location of the
actual header files. (*minor)
Also:
g++ didn't like the use of the vector class in engine.cpp .
You are iterating through the vector like an array, and
it seems to want you to use the iterator class for that.
for example:
where you have:
______________________________________________
for(i=messages.size(); i>0; i--)
if(message->executionTime >
messages[i-1]->executionTime ||
message->executionTime ==
messages[i-1]->executionTime &&
message->playerID >=
messages[i-1]->playerID)
break;
messages.insert(&messages[i], message);
____________________________________________________
I needed to put:
____________________________________________________
vector<tMessage *>::iterator iter;
for(iter = messages.end(); iter!=messages.begin();
iter++)
if(message->executionTime > iter[-1]->executionTime ||
message->executionTime ==
iter[-1]->executionTime &&
message->playerID >= iter[-1]->playerID)
break;
messages.insert(iter, message);
_________________________________________________
in order for it to compile. In addition to this part
(line 1283)
there are also several more places it choked on. It
doesn't like the insert having a pointer instead of an
iterator (even though it's technically correct). A
possible quick fix might be to cast &messages[i] as a
vector<tMessage *>::iterator , but I think that it
would be better just to use the iterator to iterate
through the vector (not that my opinion should carry
any weight since I have *no* C++ programming experience
and the extent of my knowledge is because I just looked
up stl_vector.h on google....)
Logged In: YES
user_id=663158
I also ran into some trouble with it segfaulting on all of
the focusControl calls and destroyWindow calls, but when I
used gcc version 2.96 (as opposed to $(gcc version 3.2
(Mandrake Linux 9.0 3.2-1mdk))) the program stopped
segfaulting......
I think gcc 2.96 might not have minded the vector stuff
either......*sigh....