Trunk Compile Issue

For all the help you need with Armagetron!
Post Reply
User avatar
Infa(mous)
Round Winner
Posts: 255
Joined: Thu Aug 14, 2008 11:27 pm

Trunk Compile Issue

Post by Infa(mous) »

Hi, I've been trying to compile a trunk client for windows for probably the last hour, and I've fixed most of the issues I've come across (usleep undefined, boost any.hpp not included, etc) but I have no idea what to do with this one. Please help me?
Thanks in advance.

Code: Select all

C:\Armagetronad\armagetronad\src\tron\gGame.cpp: In function `void sg_RespawnPlayer(eGrid*, gArena*, tCoord&, ePlayerNetID*)':
C:\Armagetronad\armagetronad\src\tron\gGame.cpp:3025: error: no matching function for call to `gArena::ClosestSpawnPoint()'
C:\Armagetronad\armagetronad\src\tron\gArena.h:57: note: candidates are: gSpawnPoint* gArena::ClosestSpawnPoint(tCoord)
C:\Armagetronad\armagetronad\src\tron\gGame.cpp: In function `void sg_RespawnPlayer(eGrid*, gArena*, tCoord*, ePlayerNetID*)':
C:\Armagetronad\armagetronad\src\tron\gGame.cpp:3038: error: expected primary-expression before ')' token
C:\Armagetronad\armagetronad\src\tron\gGame.cpp:3039: error: expected primary-expression before ',' token
C:\Armagetronad\armagetronad\src\tron\gGame.cpp: In function `void sg_RespawnPlayer(eGameObject&, ePlayerNetID*)':
C:\Armagetronad\armagetronad\src\tron\gGame.cpp:3046: error: expected primary-expression before '.' token
C:\Armagetronad\armagetronad\src\tron\gGame.cpp:3047: error: expected primary-expression before '.' token
C:\Armagetronad\armagetronad\src\tron\gGame.cpp: In function `void sg_RespawnPlayer(eGrid*, gArena*, eGameObject*, ePlayerNetID*)':
C:\Armagetronad\armagetronad\src\tron\gGame.cpp:3051: error: expected primary-expression before ')' token
C:\Armagetronad\armagetronad\src\tron\gGame.cpp:3053: error: expected primary-expression before '->' token
C:\Armagetronad\armagetronad\src\tron\gGame.cpp:3054: error: expected primary-expression before '->' token
-Infamous
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Trunk Compile Issue

Post by Z-Man »

Looks like we broke the respawn hack. Just comment it out, or put a #undef RESPANW_HACK in front of the first appearance of RESPAWN_HACK in that file.
User avatar
Infa(mous)
Round Winner
Posts: 255
Joined: Thu Aug 14, 2008 11:27 pm

Re: Trunk Compile Issue

Post by Infa(mous) »

The bug wasn't in the RESPAWN_HACK portion, and the RESPAWN_HACK wasn't defined in the first place (commented out). :?

It seems to be in the call to this, if it helps.

Code: Select all

void sg_RespawnPlayer(eGrid * grid, gArena * arena, tCoord & near, ePlayerNetID * p) {
    eGameObject *e=p->Object();

    if ( ( !e || !e->Alive()) && sn_GetNetState() != nCLIENT )
    {
        tCoord pos,dir;
        arena->ClosestSpawnPoint(near)->Spawn( pos, dir );

#ifdef DEBUG
        //                std::cout << "spawning player " << pni->name << '\n';
#endif
        gCycle * cycle = new gCycle(grid, pos, dir, p);
        p->ControlObject(cycle);

        sg_Timestamp();
    }
}
-Infamous
User avatar
Infa(mous)
Round Winner
Posts: 255
Joined: Thu Aug 14, 2008 11:27 pm

Re: Trunk Compile Issue

Post by Infa(mous) »

:/ Bump.
-Infamous
Luke-Jr
Dr Z Level
Posts: 2246
Joined: Sun Mar 20, 2005 4:03 pm
Location: IM: [email protected]

Re: Trunk Compile Issue

Post by Luke-Jr »

Infa(mous) wrote:Hi, I've been trying to compile a trunk client for windows for probably the last hour, and I've fixed most of the issues I've come across (usleep undefined, boost any.hpp not included, etc) but I have no idea what to do with this one. Please help me?
Please report any bugs you find, ideally with individual bugfix branches associated (bonus: daggy-fixes style). It's been a long time since anyone built on Windows I think, so I would suggest grabbing an IRC client and idling in #Armagetron (irc.freenode.net) at least until someone interested (probably z-man, epsy, or myself) can assist you in real-time. Also, have you tried the cmake branch? That's where we seem to be heading for building stuff, and seems to simplify things in various ways.
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Trunk Compile Issue

Post by Z-Man »

Part of the problem is that you seem to be using a more recent code::blocks than I used last time when I compiled the trunk; I was using 1.0rc2, which is horribly outdated. I updated to win7 and a more recent code::blocks lately, and with cmake the new thing, I don't think it would be too good an idea to adapt things to the new pure code::blocks right now. I'll be trying my luck with cmake. It already worked for cross-compilation, so setting it up for native compilation should be just a matter of telling it where to find the libraries. And preparing the libraries. That's always the biggest problem on Windows.
Post Reply