Build Error

Questions, problems and discussion about compiling FreeOrion.

Moderator: Oberlus

Post Reply
Message
Author
User avatar
Bigjoe5
Designer and Programmer
Posts: 2058
Joined: Tue Aug 14, 2007 6:33 pm
Location: Orion

Build Error

#1 Post by Bigjoe5 »

In trying to build the latest revision of FO, I get 192 errors, all of which are in Universe.h near the end, in two lines with 96 errors each, a few lines apart. The error (there is only 1, repeated 192 times) is

Code: Select all

error: expected primary-expression before '>' token in Universe.h
The lines in question read

Code: Select all

    return GetUniverse().Objects().Object<T>(object_id);
and

Code: Select all

return GetUniverse().EmpireKnownObjects(empire_id).Object<T>(object_id);
I suspect that this involves that '>' which should apparently just be enclosing that 'T', but which my compiler somehow thinks means something else (which would be very strange, since there are '>'s all over the place)?

Well, all I can really do by myself is speculate. Any suggestions?
Warning: Antarans in dimensional portal are closer than they appear.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Build Error

#2 Post by Geoff the Medio »

Apparently MSVC is once again less picky than GCC.

http://groups.google.com/group/comp.lan ... 553fb488c6

Not exactly the same situation, but try this:

In those two lines, replacing:

Code: Select all

Object<T>
with

Code: Select all

template Object<T>
so, for the first, it would be

Code: Select all

return GetUniverse().Objects().template Object<T>(object_id);
And maybe it'll work...?

User avatar
Bigjoe5
Designer and Programmer
Posts: 2058
Joined: Tue Aug 14, 2007 6:33 pm
Location: Orion

Re: Build Error

#3 Post by Bigjoe5 »

It now builds successfully. Thanks.
Warning: Antarans in dimensional portal are closer than they appear.

Post Reply