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

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
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Compiling spring (mingw and visual studio 7/8)

Post by lurker »

DarkFarmer wrote:I am using all the correct packaged files because i'm copying the game exe over my standard installer game exe and running it, so it has everything the packaged spring.exe has, its just that there's something wrong with my build. any ideas?
There have been updates to the packaged files and other things since 75b2. You need to either use an svn-based installer from http://buildbot.no-ip.org/~buildbot/spring/installer/ or run the .bat to generate your own base content packages.
DarkFarmer
Posts: 4
Joined: 24 Dec 2007, 05:51

Re: Compiling spring (mingw and visual studio 7/8)

Post by DarkFarmer »

thanks for your attention to my pleas :)

actually, i think the problem is not in my packages which seem to be okay but in my build.

for some reason, i dont think my zip libs are correct, and i dont think my build unzips the packed files correctly.

ill tell you what i did exactly to get it to compile and run. i use the SVN to get the source and i build with VC8 2005. It doesnt compile right away so i have to copy in the windows lib pack, i use the seven zip i found on this thread for that. Then i have to copy the DLLs from the prebuilt libs folder into my Spring root, and then it compiles and runs, but when i try to load the game it fails. I think its not using the right zip lib, so its not getting into the pak files.

if I am using the current SVN, what mingwlibs should i be using? thanks.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Compiling spring (mingw and visual studio 7/8)

Post by lurker »

DarkFarmer wrote:if I am using the current SVN, what mingwlibs should i be using? thanks.
10, but you only need that to compile with minGW.

Why don't you try to compile a copy of 75b2 to see if it will work right?
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Compiling spring (mingw and visual studio 7/8)

Post by Tobi »

lurker wrote:(side note: They're not included in the svn installer... Do buildbot builds not have ogg support? I'll give someone 20 bucks to tell me the exact settings buildbot uses to compile. My exes, like KDR's, are also about 2MB larger.)
Mingwlibs ogg vorbis is a static link library, I only included the DLLs by accident, but it appeared the exe doesn't need them. (the lib*.a were a big bit anyway for DLL import libs)

As for the exact configuration: buildbot compiles with scons configure platform=windows debug=yes debugdefines=no optimize=yes, and then manually calls strip on all executables/DLLs to strip them from debugging symbols (after copying the version with debugging symbols over to a storage area also used by the stacktrace translator.)

You can check that yourself :-)
http://buildbot.no-ip.org:8010/mingw32- ... onfigure/0
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Compiling spring (mingw and visual studio 7/8)

Post by lurker »

Tobi wrote:Mingwlibs ogg vorbis is a static link library, I only included the DLLs by accident, but it appeared the exe doesn't need them. (the lib*.a were a big bit anyway for DLL import libs)
That's... interesting to say the least. When I just simply build spring with scons on default settings, the exe is dependent on libogg-cs.dll, libvorbis-cs.dll, and libvorbisfile-cs.dll. I'll try those settings now.

Maybe I unzipped the wrong version of mingwlibs...

Edit: yep, I had had v9 sitting there. Everything is working fine now. Thanks aplenty.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Compiling spring (mingw and visual studio 7/8)

Post by AF »

Svn built with VS2005 and latest vclibs complains about missing vorbisfile.dll and ogg.dll. I cannot find the correct files that don't generate error messages about missing functions, and the files are nowhere to be found on the spring site and svn/vclib files.

Can someone amend the vclibs package accordingly or add the dll's to svn? (aka the former)
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Compiling spring (mingw and visual studio 7/8)

Post by Tobi »

No DLLs in SVN please.

Working DLLs are in the Mingwlibs package AFAIK. (lurker forgot to add them to the vclibs package and I forgot to remove them from the mingwlibs package ;-))
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Compiling spring (mingw and visual studio 7/8)

Post by AF »

yay, thank you Tobi for clearing that up.
user
Posts: 452
Joined: 22 Jan 2008, 16:33

Re: Compiling spring (mingw and visual studio 7/8)

Post by user »

i get this error at the end of compilation:

Code: Select all

C:\MinGWPythonScons\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\l
d.exe: cannot find -lstreflop
collect2: ld returned 1 exit status
scons: *** [game\spring.exe] Error 1
scons: building terminated because of errors.
i am using mingw, streflop compiles with sucess, lastest svn revision.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Compiling spring (mingw and visual studio 7/8)

Post by AF »

http://pastebin.com/d69a0f3e4

Any help would be appreciated, its using Visual Studio 2008.
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Re: Compiling spring (mingw and visual studio 7/8)

Post by rattle »

Unknown post id, it may have expired or been deleted.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Compiling spring (mingw and visual studio 7/8)

Post by AF »

oops, my mistake
When starting the Build I get this error:

Fehler 2 error C2664: 'SymEnumerateModules': Konvertierung des
Parameters 2 von 'BOOL (__stdcall *)(LPSTR,DWORD,PVOID)' in
'PSYM_ENUMMODULES_CALLBACK' nicht m├â┬Âglich
c:\Programme\spring_dev\trunk\rts\System\Platform\Win\CrashHandler.cpp 134


(sorry for the german, but I can not switch the VC-lang to english)

That error means, that there is a Type Conversion Problem for the second
Argument of the Line:

SymEnumerateModules(GetCurrentProcess(), EnumModules, NULL);

I tried to uncommend that line. But then I get the following error:

Fehler 2 error LNK2019: Verweis auf nicht aufgel├â┬Âstes externes Symbol
""public: static void __cdecl ProfileDrawer::Enable(void)"
(?Enable@ProfileDrawer@@SAXXZ)" in Funktion ""public: bool __thiscall
CGame::ActionPressed(struct CKeyBindings::Action const &,class CKeySet
const &,bool)"
(?ActionPressed@CGame@@QAE_NABUAction@CKeyBindings@@ABVCKeySet@@_N@Z)". Game.obj
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Compiling spring (mingw and visual studio 7/8)

Post by Tobi »

Second one should be solved I think, project file wasn't up to date (that is usually the problem if you get a link error about missing symbol).

For the first one, could you check how SymEnumerateModules is declared (in 2008), that may give a clue. (Stupid error doesn't seem to give what it wants to convert to...)
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Compiling spring (mingw and visual studio 7/8)

Post by AF »

Code: Select all

ChatMessage.cpp
Console.cpp
Action.cpp
..\..\Game\Action.cpp(13) : error C2039: 'transform' : is not a member of 'std'
..\..\Game\Action.cpp(13) : error C3861: 'transform': identifier not found
Generating Code...
Visual studio 2005.

It may also be noted that those 3 files had to be added to the project.
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Re: Compiling spring (mingw and visual studio 7/8)

Post by rattle »

The older project files weren't up to date when I still compiled with VS 7.1...
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Re: Compiling spring (mingw and visual studio 7/8)

Post by submarine »

After a while I got some time to work on AAI. Therefore I was trying to build spring (latest svn version) with vs net 2005 - the following errors occurred:

d:\spiele\ta spring source\rts\game\ui\EndGameBox.h(52) : error C2039: 'fabs' : is not a member of 'std'
...
and many more. After removing std:: in front of fabs, floor etc. (btw: what is that good for?) I got a bunch of new errors:

Code: Select all

1>d:\Spiele\TA Spring Source\rts\lib\luabind\luabind/detail/method_rep.hpp(51) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:\Spiele\TA Spring Source\rts\lib\luabind\luabind/detail/method_rep.hpp(51) : error C2143: syntax error : missing ',' before '&'
1>d:\Spiele\TA Spring Source\rts\lib\luabind\luabind/detail/method_rep.hpp(65) : error C2065: 'overload_rep' : undeclared identifier
1>d:\Spiele\TA Spring Source\rts\lib\luabind\luabind/detail/method_rep.hpp(53) : error C2923: 'std::vector' : 'overload_rep' is not a valid template type argument for parameter '_Ty'
1>        d:\Spiele\TA Spring Source\rts\lib\luabind\luabind/detail/method_rep.hpp(51) : see declaration of 'overload_rep'
1>d:\Spiele\TA Spring Source\rts\lib\luabind\luabind/detail/method_rep.hpp(53) : error C2663: 'std::vector<_Ty,_Alloc>::begin' : 2 overloads have no legal conversion for 'this' pointer
1>d:\Spiele\TA Spring Source\rts\lib\luabind\luabind/detail/method_rep.hpp(53) : error C2663: 'std::vector<_Ty,_Alloc>::end' : 2 overloads have no legal conversion for 'this' pointer
1>d:\Spiele\TA Spring Source\rts\lib\luabind\luabind/detail/method_rep.hpp(53) : error C2065: 'o' : undeclared identifier
1>d:\Spiele\TA Spring Source\rts\lib\luabind\luabind/detail/method_rep.hpp(54) : error C2663: 'std::vector<_Ty,_Alloc>::end' : 2 overloads have no legal conversion for 'this' pointer
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Compiling spring (mingw and visual studio 7/8)

Post by AF »

I had a similar problem with tolower and I found adding the algorithm header fixed it, perhaps a similar problem is occurring for you?
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Compiling spring (mingw and visual studio 7/8)

Post by imbaczek »

is that a recent revision? I've been messing around with includes in several places, because gcc 4.3 didn't manage to compile anything (except NTai IIRC.)

anyways, #include <cmath> and std::fabs and friends will work.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Compiling spring (mingw and visual studio 7/8)

Post by Tobi »

Actually I think std::fabs, std::sin etc. isn't recognized by MSVC 2005 at all.

I haven't looked more closely though into the recent MSVC build failures, but we might need a math compat header or something, and change all std::fabs to e.g. FABS and #defining that to the right thing based on compiler vendor/version. (or inline wrapper functions or something like that)
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Compiling spring (mingw and visual studio 7/8)

Post by AF »

Do you mean NTai compiled fine despite those issues, or do you mean you didn't test if NTai still compiled?

I find NTai seems somewhat resilient to these sorts of changes because I shunted everything into a single namespace and then used a single header file full of masses of #include's, hardly ideal mind you, I should really check if there are any unneeded lines, and the compile times are much longer.
Post Reply

Return to “Engine”