Compiling spring (mingw and visual studio 7/8) - Page 19

Compiling spring (mingw and visual studio 7/8)

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

note for all users:: devc++ is old and as such comes with an old mingw32 so make sure its all kept upto date.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6241
Joined: 29 Apr 2005, 01:14

Post by FLOZi »

I've recently transferred over to a plain MingW build (and Code::Blocks, but i don't actually use that for Spring) and it's gone swimmingly. Updating devcpp can be a pain.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Code: Select all

rts\Game\GameServer.cpp: In constructor `CGameServer::CGameServer(int, const std::string&, const std::string&, const std::string&, const std::string&)':
rts\Game\GameServer.cpp:93: error: call of overloaded `bind(void (CGameServer::*)(), CGameServer* const)' is ambiguous
mingwlibs/include/boost/bind.hpp:1235: note: candidates are: boost::_bi::bind_t<R, F, typename boost::_bi::list_av_1<A1>::type> boost::bind(F, A1) [with R = void, F = void (CGameServer::*)(), A1 = CGameServer*]
mingwlibs/include/boost/bind/bind_mf_cc.hpp:21: note:                 boost::_bi::bind_t<R, boost::_mfi::mf0<R, T>, typename boost::_bi::list_av_1<A1>::type> boost::bind(R (T::*)(), A1) [with R = void, T = CGameServer, A1 = CGameServer*]
I recall seeing someone else have this error before...
tombom
Posts: 1933
Joined: 18 Dec 2005, 20:21

Post by tombom »

Yeah, I'm having this error as well.
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

I skipped getting DevC++ entirely and just gotten mingw and everything else needed directly.

Looks like your boost version is wrong btw.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

codeblocks nightly builds and netbeans just pwn devc++ hard now
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Is there a way to get Boost without dealing with those three different build systems it needs?
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

Dunno, I built it myself back then (ending up with 1.5 GB of useless libs cause I'm stupid). I think I did, dunno it's quite some time ago.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Post by imbaczek »

KDR: check the buildbots, gcc >= 4.1 don't experience this.
aash29
Posts: 15
Joined: 23 Sep 2007, 20:28

Post by aash29 »

uninstalled DevC++ as AF recommended, updated minGW to gcc 3.4.5, but it seems that problem is somewhere else. I still get "can't locate -lstreflop' message, although in the beginning it says 'Succes building streflop'
-Lrts\lib\streflop -Lmingwlibs\lib -LD:\MinGW\lib -lopengl32 -lglew32 -lglu32 -ldevil -lILU -lSDL -lSDLmain -lboost_regex-mt -lboost_thread-mt
-ldsound -lfreetype -lgdi32 -limagehlp -lmingw32 -lole32 -lpython25
-lwinmm -lwsock32 -lz -lstreflop
D:\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: cannot find -lstreflop
collect2: ld returned 1 exit status
scons: *** [game\spring.exe] Error 1
scons: building terminated because of errors.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Post by imbaczek »

try searching for streflop.a and rename it to libstreflop.a, may help.

also, gcc 3.4.5 was broken in a recent commit; not sure what is needed to fix it.
aash29
Posts: 15
Joined: 23 Sep 2007, 20:28

Post by aash29 »

thanks for swift answer, but looks like no streflop.a file is produced

a while ago Michilus_nimbus reported:
Michilus_nimbus wrote:Well, I got the streflop.a and libstreflop.a files from buildbot, so it works like a charm now.

is it possible to acquire it from buildbot?
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Post by imbaczek »

Mine gets built in rts\lib\streflop\ and it works.
aash29
Posts: 15
Joined: 23 Sep 2007, 20:28

Post by aash29 »

right,
got mine at
http://www.osrts.info/~buildbot/spring/ ... streflop.a
and managed to compile at last
thanks
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Current svn fails to compile udner VS2005

http://www.pastebin.ca/717472
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Code: Select all

1>Compiling...
1>GameServer.cpp
1>DemoReader.cpp
1>DemoRecorder.cpp
1>..\..\System\DemoRecorder.cpp(155) : error C3861: 'assert': identifier not found
1>..\..\System\DemoRecorder.cpp(163) : error C3861: 'assert': identifier not found
1>NetProtocol.cpp
1>ArchiveScanner.cpp
1>Generating Code...
User avatar
ILMTitan
Spring Developer
Posts: 410
Joined: 13 Nov 2004, 08:35

Post by ILMTitan »

I'm getting this compile error:

Code: Select all

rts\Game\GameServer.cpp: In constructor `CGameServer::CGameServer(int, const std::string&, const std::string&, const std::string&, const std::string&)':
rts\Game\GameServer.cpp:94: error: call of overloaded `bind(void (CGameServer::*)(), CGameServer* const)' is ambiguous
mingwlibs/include/boost/bind.hpp:1235: note: candidates are: boost::_bi::bind_t<R, F, typename boost::_bi::list_av_1<A1>::type> boost::bind(F, A1) [with R = void, F = void (CGameServer::*)(), A1 = CGameServer*]
mingwlibs/include/boost/bind/bind_mf_cc.hpp:21: note:                 boost::_bi::bind_t<R, boost::_mfi::mf0<R, T>, typename boost::_bi::list_av_1<A1>::type> boost::bind(R (T::*)(), A1) [with R = void, T = CGameServer, A1 = CGameServer*]
scons: building terminated because of errors.
I can fix it by changing

Code: Select all

	thread = new boost::thread(boost::bind<void>(&CGameServer::UpdateLoop, this));
to

Code: Select all

thread = new boost::thread(boost::bind<void, CGameServer, CGameServer*>(&CGameServer::UpdateLoop, this));
Perhaps my boot libs are outdated?
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

No, it's because it's GCC 3.4.5.

But if that fix appears to compile on other GCCs I will commit it.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Installing GCC4 on Windows isn't exactly a trivial task, fixing this would be good.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

Ya, it's fixed already (since yesterday morning or so, I cba to post everytime I fix something :-))
Post Reply

Return to “Engine”