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

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
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

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

Post by Auswaschbar »

hoijui wrote:there is a problem with building streflop:
am compiling spring on linux, sometimes with scons sometimes with CMake. CMake overwrites the 'native' Makefile for streflop (rts/lib/streflop/Makefile). so when switching from cmake to scons, one has to revert the Makefile from SVN every time. inconvienient! after a while using only CMake, i will forget it, and i will have to find out again why i get undefined symbols when linking. it is also bad cause i or someone else may accidentially ubload the CMake generated Makefile to SVN, and then everyone would have the problem.

maybe we should alternate one of the two build systems to use an other filename (not Makefile). we could have Makefile.scons eg, which is copied to Makefile on scons configure.
Uhm, no. If you don't build inside trunk (which is recommended btw), the only changes to trunk/ are the creation of the *.sdz files in game/, nothing else get changed. So if you want to build with cmake, make a seperate build directory and build it there.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

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

Post by imbaczek »

still, cmake does overwrite streflop makefile, which is IMHO poor form; can it be worked around?
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

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

Post by Auswaschbar »

imbaczek wrote:still, cmake does overwrite streflop makefile, which is IMHO poor form; can it be worked around?
Yes, by building somewhere else and not in the source directory. Not only its damn easy to do, you get lots of other benefits from it.

Apart from this, I don't see any way to workaround this (despite the fact that I don't see a reason to do so).
User avatar
LoidThanead
Posts: 58
Joined: 27 Feb 2008, 16:16

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

Post by LoidThanead »

Hi all,

after checking out the new version from SVN today, I can no longer compile the spring engine. I was working with 0.76b2 before, and I could compile it just fine.

I'm using VC 2005 Express Edition, working on Windows XP. I have opened the .sln file for VS8.0 that's in the SVN repository, without modifications.
I get an error when linking:

Code: Select all

DataDirLocater.obj : error LNK2019: unresolved external symbol __imp__SHGetFolderPathA@20 referenced in function "public: void __thiscall DataDirLocater::LocateDataDirs(void)" (?LocateDataDirs@DataDirLocater@@QAEXXZ)
../../../game/spring.exe : fatal error LNK1120: 1 unresolved externals
Does anyone know what might cause this? Any help is much appreciated.


Edit:
I managed to get rid of the error by adding 'SHFolder.lib' to Project Properties -> Linker -> Additional Dependencies.
User avatar
YamroZ
Posts: 35
Joined: 24 Oct 2006, 10:13

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

Post by YamroZ »

Hi guys.

I've got a problem with VS 2008.
I've checked out svn version and tried to build it but got this:

Code: Select all

Error	1	error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::_String_iterator<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::insert(class std::_String_iterator<char,struct std::char_traits<char>,class std::allocator<char> >,char)" (__imp_?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D
@2@@std@@QAE?AV?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@V32@D@Z) referenced in function "public: struct boost::re_detail::re_syntax_base * __thiscall boost::re_detail::basic_regex_creator<char,struct boost::regex_traits<char,class boost::w32_regex_traits<char> > >::append_set(class boost::re_detail::basic_char_set<char,struct boost::regex_traits<char,class boost::w32_regex_traits<char> > > const &,struct boost::mpl::bool_<0> *)" (?append_set@?$basic_regex_creator@DU?$regex_traits@DV?$w32_regex_traits@D
@boost@@@boost@@@re_detail@boost@@QAEPAUre_syntax_base@23@ABV?$basic_char_set
@DU?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@23@PAU?$bool_@$0A@@mpl@3@@Z)	libboost_regex-vc80-mt-1_33_1.lib	rts
What does it mean ? Should I build my own version of boost ? Or is it issue with VS2008 ?

Please help.

YamroZ
Last edited by YamroZ on 20 Oct 2008, 11:34, edited 1 time in total.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

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

Post by Tobi »

Seems like problem with different C++ runtimes for the different libraries. Which boost libs did you use? Where they specifically compiled for (with) Visual Studio 2008?
User avatar
Jazcash
Posts: 5309
Joined: 08 Dec 2007, 17:39

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

Post by Jazcash »

AGHRR FORUM STRETCH.
User avatar
YamroZ
Posts: 35
Joined: 24 Oct 2006, 10:13

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

Post by YamroZ »

I've used Boost libs from svn. Ill try to rebuild them from sources. Thanks for hint.

@JAZCASH
I'm terrible sorry! Post edited ;)
khayyam
Posts: 4
Joined: 06 Feb 2006, 16:42

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

Post by khayyam »

For VC++ 2005, libogg is missing in the vclibs package, isn't it ? Anyone using VC++ 2005 needs to add it separately to its development environment.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

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

Post by Tobi »

Yeah, the required libs are in the mingwlibs package accidentally, if I recall correctly.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

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

Post by hoijui »

updated migwlibs, now v12

added GNU Awk 3.1.6 (awk.exe), cause it is used to generate wrapper code in the AI Interfaces.

added libjvm.dll.a, needed by the Java AI Interface (JNI)

http://spring.jobjol.nl/show_file.php?id=1626

also updated references it in the Wiki Build instructions here:
http://spring.clan-sy.com/wiki/Building_spring
sophitus
Posts: 1
Joined: 22 Dec 2008, 16:24

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

Post by sophitus »

Cannot download mingwlibs v12, link does not work anymore

http://spring.jobjol.nl/show_file.php?id=1626

Can somebody provide new one?

Maybe torrent?
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

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

Post by hoijui »

it works fine here.
i downloaded and extracted it just now, to test, from the link you provided. no problem.
dled it directly from jobjol.nl, but it is on two other mirrors aswell.
maybe one of them has a corupted version of it.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

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

Post by Beherith »

VS 2005 compilation works just fine with the following extras:
Latest glew, copy it to vclibs
Latest libogg, compiled and linked into VS
Latest libvorbis, compile libvorbisile and libvorbis, and link into VS
The above mentions SHFolder.lib addition to VS project file lib list.

libogg.lib and the other two might need renaming to ogg.lib etc. after compiling
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

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

Post by submarine »

Can someone compile current source with vs net 2005?

For "Final release" I get
1>..\..\System\Net\UDPConnection.cpp(183) : error C2039: 'second' : is not a member of 'netcode::RawPacket'
1> e:\spiele\spring source\rts\system\net\RawPacket.h(12) : see declaration of 'netcode::RawPacket'
1>..\..\System\Net\UDPConnection.cpp(183) : error C2227: left of '->data' must point to class/struct/union/generic type
1>..\..\System\Net\UDPConnection.cpp(183) : error C2039: 'second' : is not a member of 'netcode::RawPacket'
1> e:\spiele\spring source\rts\system\net\RawPacket.h(12) : see declaration of 'netcode::RawPacket'
1>..\..\System\Net\UDPConnection.cpp(183) : error C2227: left of '->data' must point to class/struct/union/generic type
1>..\..\System\Net\UDPConnection.cpp(183) : error C2039: 'second' : is not a member of 'netcode::RawPacket'
1> e:\spiele\spring source\rts\system\net\RawPacket.h(12) : see declaration of 'netcode::RawPacket'
1>..\..\System\Net\UDPConnection.cpp(183) : error C2227: left of '->length' must point to class/struct/union/generic type
1>..\..\System\Net\UDPConnection.cpp(377) : error C2039: 'first' : is not a member of 'netcode::RawPacket'
1> e:\spiele\spring source\rts\system\net\RawPacket.h(12) : see declaration of 'netcode::RawPacket'
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

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

Post by imbaczek »

i think you've got outdated boost, update it and try again.
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

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

Post by submarine »

Hmm got problems with other libraries as well, would it be possible to update the vclibs package?
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

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

Post by lurker »

imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

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

Post by imbaczek »

yeah, don't use vs2005, use vs2008.
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

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

Post by submarine »

lurker wrote: Why using 2005?
Because I dont have 2008?!?

Unfortunately, following the link I only get the vclibs version I already have. Is there anyone using vs.net 2005 who can upload his vclibs folder?
Post Reply

Return to “Engine”