trying to build latest code

Programmers discuss here anything related to FreeOrion programming. Primarily for the developers to discuss.

Moderator: Committer

Post Reply
Message
Author
vorenhutz
Pupating Mass
Posts: 98
Joined: Sun Mar 07, 2004 11:41 pm

trying to build latest code

#1 Post by vorenhutz »

I've had this problem now for the last 2 revisions of windowskit.zip. I'm on winxp with dev-cpp (mingw/gcc 3.2).

Code: Select all

g++.exe -c chmain.cpp -o ../../objs/chmain.o -I"F:/apps/Dev-Cpp/include/c++"  -I"F:/apps/Dev-Cpp/include/c++/mingw32"  -I"F:/apps/Dev-Cpp/include/c++/backward"  -I"F:/apps/Dev-Cpp/include"  -I"f:/apps/Dev-Cpp/include/SDL"  -I"f:/apps/Dev-Cpp/include/c++/mingw32"  -I"F:/temp/fo/boost-1.30.2"  -I"f:/apps/Dev-Cpp/include/freetype2"  -I"F:/temp/fo/FreeOrion/log4cpp-0.2.7/include"  -I"../../GG/include"  -I"../../GG/include/net"  -I"../../GG/include/dialogs"  -I"../../GG/include/SDL" -DFREEORION_WIN32 -DFREEORION_BUILD_HUMAN    -O1

chmain.cpp: In function `int SDL_main(int, char**)':
chmain.cpp:31: cannot declare variable `app' to be of type `HumanClientApp'
chmain.cpp:31:   because the following virtual functions are abstract:
../../GG/include/SDL/SDLGGApp.h:110: 	virtual void SDLGGApp::Update()

make.exe: *** [../../objs/chmain.o] Error 1

Execution terminated
I'm stumped... and a bit frustrated :/ I've reinstalled dev-cpp, the only thing I can think of to do is checkout a fresh copy from CVS, but I'm sure I never touched the code I'm trying to build so that probably won't help. And I've got no idea what the compiler is comlaining about in that error message unfortunately.

noelte
Juggernaut
Posts: 872
Joined: Fri Dec 26, 2003 12:42 pm
Location: Germany, Berlin

#2 Post by noelte »

Do you also got a clean copy of fo? Zach made some changes lately.

tzlaine
Programming Lead Emeritus
Posts: 1092
Joined: Thu Jun 26, 2003 1:33 pm

#3 Post by tzlaine »

You also need to get the latest GG DLLs; I updated WindowsKit.zip last night.

vorenhutz
Pupating Mass
Posts: 98
Joined: Sun Mar 07, 2004 11:41 pm

#4 Post by vorenhutz »

Yes, this is with the latest GG and FO. I'm about to do a fresh checkout though, I'll let you know.

vorenhutz
Pupating Mass
Posts: 98
Joined: Sun Mar 07, 2004 11:41 pm

#5 Post by vorenhutz »

Still no luck. And there is also an internal compiler error in xDiff.cpp. Looks like mingw needs updating.
I'm also looking at compiling in cygwin, will the stuff in windowskit.zip work or do I have to build the libraries + dlls from scratch?

tzlaine
Programming Lead Emeritus
Posts: 1092
Joined: Thu Jun 26, 2003 1:33 pm

#6 Post by tzlaine »

vorenhutz wrote:Still no luck. And there is also an internal compiler error in xDiff.cpp. Looks like mingw needs updating.
I'm also looking at compiling in cygwin, will the stuff in windowskit.zip work or do I have to build the libraries + dlls from scratch?
The DLLs will work fine as-is. But to use them you'll need to create a makefile by hand, since the autotools build system won't know what to do with them.

vorenhutz
Pupating Mass
Posts: 98
Joined: Sun Mar 07, 2004 11:41 pm

#7 Post by vorenhutz »

I think the internal compiler errors can be avoided by turning off optimisation in dev-cpp. It's too darned slow anyway so who needs it ;)

vorenhutz
Pupating Mass
Posts: 98
Joined: Sun Mar 07, 2004 11:41 pm

#8 Post by vorenhutz »

I still can't see a way around this. I downloaded the latest mingw and set up dev-cpp to compile with it, I still get the same error. I even puttered around in lunix for a bit, but discovered that my RH 7.1 isos may as well be stone axes :)
{edit}
I see the problem now. I just checked out the latest GG and the headers are different to those in FO's windowskit.zip (Zach's latest commit). It would be nice if there were a way to compile GG in dev-cpp, windowskit often seems to be out of date :/

vorenhutz
Pupating Mass
Posts: 98
Joined: Sun Mar 07, 2004 11:41 pm

#9 Post by vorenhutz »

Aha! some progress, I get a different error now.
I used the headers from a fresh checkout of GG instead of the ones in windowskit.zip, which are a few days older.

Code: Select all

Compiler: Default compiler
Building Makefile: "F:\apps\fo\fresh\FreeOrion\client\human\Makefile.win"
Executing  make...
make.exe -f "F:\apps\fo\fresh\FreeOrion\client\human\Makefile.win" all
g++.exe -c chmain.cpp -o ../../objs/chmain.o -I"F:/apps/Dev-Cpp/include/c++"  -I"F:/apps/Dev-Cpp/include/c++/mingw32"  -I"F:/apps/Dev-Cpp/include/c++/backward"  -I"F:/apps/Dev-Cpp/include"  -I"f:/apps/Dev-Cpp/include/SDL"  -I"f:/apps/boost-1.30.2"  -I"f:/apps/Dev-Cpp/include/freetype2"  -I"f:/apps/log4cpp-0.2.7/include"  -I"../../GG/include"  -I"../../GG/include/net"  -I"../../GG/include/dialogs"  -I"../../GG/include/SDL" -DFREEORION_WIN32 -DFREEORION_BUILD_HUMAN   

In file included from ../../GG/include/GGApp.h:32,
                 from ../../GG/include/SDL/SDLGGApp.h:45,
                 from HumanClientApp.h:7,
                 from chmain.cpp:1:
../../GG/include/GGBase.h:293: `name' was not declared in this scope
../../GG/include/GGBase.h:293: `EnumMap' is not a template
../../GG/include/GGBase.h:295: parse error before `{' token
../../GG/include/GGBase.h:301: ISO C++ forbids declaration of `EnumMap' with no 

   type
../../GG/include/GGBase.h:317: destructors must be member functions
../../GG/include/GGBase.h:317: virtual outside class declaration

../../GG/include/GGBase.h: In function `void EnumMap()':
../../GG/include/GGBase.h:317: new declaration `void EnumMap()'
../../GG/include/GGBase.h:301: ambiguates old declaration `int EnumMap()'
../../GG/include/GGBase.h: At global scope:
../../GG/include/GGBase.h:321: virtual outside class declaration
../../GG/include/GGBase.h:321: non-member function `const std::string& 
   FromEnum(int)' cannot have `const' method qualifier
../../GG/include/GGBase.h: In function `const std::string& FromEnum(int)':
../../GG/include/GGBase.h:323: `map_' undeclared (first use this function)
../../GG/include/GGBase.h:323: (Each undeclared identifier is reported only 
   once for each function it appears in.)
../../GG/include/GGBase.h:323: `EnumType' undeclared (first use this function)

../../GG/include/GGBase.h: At global scope:
../../GG/include/GGBase.h:329: non-member function `int FromString(const 
   std::string&)' cannot have `const' method qualifier

../../GG/include/GGBase.h: In function `int FromString(const std::string&)':
../../GG/include/GGBase.h:331: template argument 1 is invalid
../../GG/include/GGBase.h:331: template argument 3 is invalid
../../GG/include/GGBase.h:331: template argument 4 is invalid
../../GG/include/GGBase.h:331: parse error before `=' token
../../GG/include/GGBase.h:333: `it' undeclared (first use this function)
../../GG/include/GGBase.h:345: `BAD_VALUE' undeclared (first use this function)
../../GG/include/GGBase.h: At global scope:

../../GG/include/GGBase.h:349: `BAD_VALUE' used prior to declaration
../../GG/include/GGBase.h:351: template argument 1 is invalid
../../GG/include/GGBase.h:351: template argument 3 is invalid
../../GG/include/GGBase.h:351: template argument 4 is invalid
../../GG/include/GGBase.h:351: ISO C++ forbids declaration of `map_' with no 
   type
../../GG/include/GGBase.h:351: `int map_' used prior to declaration

../../GG/include/GGBase.h:353: parse error before `}' token
../../GG/include/GGBase.h:361: type specifier omitted for parameter `name'
../../GG/include/GGBase.h:361: parse error before `&' token
../../GG/include/GGBase.h:363: `std::istream& operator>>(...)' must have an 
   argument of class or enumerated type
../../GG/include/GGBase.h:363: `std::istream& operator>>(...)' must take 
   exactly two arguments
../../GG/include/GGBase.h: In function `std::istream& operator>>(...)':
../../GG/include/GGBase.h:367: `is' undeclared (first use this function)
../../GG/include/GGBase.h:369: `v' undeclared (first use this function)
../../GG/include/GGBase.h:369: `GetEnumMap' undeclared (first use this 
   function)
../../GG/include/GGBase.h:369: `name' undeclared (first use this function)
../../GG/include/GGBase.h:369: parse error before `)' token

../../GG/include/GGBase.h: At global scope:
../../GG/include/GGBase.h:381: type specifier omitted for parameter `name'
../../GG/include/GGBase.h:381: parse error before `)' token
../../GG/include/GGBase.h:383: `std::ostream& operator<<(...)' must have an 
   argument of class or enumerated type
../../GG/include/GGBase.h:383: `std::ostream& operator<<(...)' must take 
   exactly two arguments
../../GG/include/GGBase.h: In function `std::ostream& operator<<(...)':
../../GG/include/GGBase.h:385: `os' undeclared (first use this function)
../../GG/include/GGBase.h:385: parse error before `)' token

../../GG/include/GGBase.h: At global scope:
../../GG/include/GGBase.h:473: parse error before `{' token
../../GG/include/GGBase.h:479: ISO C++ forbids declaration of `x' with no type
../../GG/include/GGBase.h: In function `int GG::x(const std::string&)':
../../GG/include/GGBase.h:479: only constructors take base initializers
../../GG/include/GGBase.h:479: confused by earlier errors, bailing out

make.exe: *** [../../objs/chmain.o] Error 1

Execution terminated
I also get the same errors if I try to build GG with dev-cpp (I tried to manually convert the makefile.mingw into a dev-cpp project).

tzlaine
Programming Lead Emeritus
Posts: 1092
Joined: Thu Jun 26, 2003 1:33 pm

#10 Post by tzlaine »

You're missing something, somewhere. That line number does not match that error in my GGBase.h. You've got the wrong version somehow, whether from WindowsKit.zip or not.

tzlaine
Programming Lead Emeritus
Posts: 1092
Joined: Thu Jun 26, 2003 1:33 pm

#11 Post by tzlaine »

I checked the GG headers in WindowsKit.zip, and you're right, they are out of synch. Sorry about that; I don't know how that happened. I just uploaded the correct ones in a new revision of WindowsKit.zip. Just to be sure, I checked the web-accessible CVS for GG, and the header in your error message (GGBase.h) matches mine, and neither of those matches the error message you posted. So I really don't know what's going on with the error messages per se.

vorenhutz
Pupating Mass
Posts: 98
Joined: Sun Mar 07, 2004 11:41 pm

#12 Post by vorenhutz »

OK, I've got windowskit 1.28 out of CVS.

Success! I'm building freeorion.exe now, 3/4 of the way through and no errors so far (before I couldn't compile the first file).

I guess the error (or version problem) wasn't in GGBase but something included by it, but the compiler didn't notice something wrong until a bit later. Whatever, it seems to be fixed now, Cheers Zach. :)

I still get the ICE if I try to optimise though, so perhaps the .dev project files should be change to do no optimisation.

Post Reply