Compiling spring (mingw and visual studio 7/8)
Moderator: Moderators
Re: Compiling spring (mingw and visual studio 7/8)
I would rather use Visual Studio to develop NTai than have to set up a mingw environment everyday at uni then have to set it up again from scratch everytime I log out.
So mingw is not an option for AI development right now.
That and despite numerous attempts, I could never get debugging to work with mingw.
So mingw is not an option for AI development right now.
That and despite numerous attempts, I could never get debugging to work with mingw.
Re: Compiling spring (mingw and visual studio 7/8)
AF, you might check out the wiki, and try the most obvious spot: development - windows - visual studio
Re: Compiling spring (mingw and visual studio 7/8)
If I was running with visual studio 2005 yes, if I was running under Visual Studio 2008 no ( I'm running 2008! )
Re: Compiling spring (mingw and visual studio 7/8)
I tried compiling Spring tag 0.80.5.2 with CMake + MinGW on Windows XP sp2 and got a few small errors in the Spring code (which I quickly fixed), but I still get boost errors while linking which I dont know how to fix - see attached file.
Anyone knows what I am doing wrong?
It seems these boost libs are MT versions while I compile non-MT Spring, but Mingwlibs pack comes only with these libs. What should I do then?
And btw does MinGW save compile logs somewhere?
Thx for help in advance.
Anyone knows what I am doing wrong?
It seems these boost libs are MT versions while I compile non-MT Spring, but Mingwlibs pack comes only with these libs. What should I do then?
And btw does MinGW save compile logs somewhere?
Thx for help in advance.
- Attachments
-
- console.txt
- Error while linking
- (21.04 KiB) Downloaded 154 times
Re: Compiling spring (mingw and visual studio 7/8)
Which version of MinGW?
(On first sight, it seems your MinGW is compiling Spring for one type of exception handling, while boost is compiled for the other type.)
(On first sight, it seems your MinGW is compiling Spring for one type of exception handling, while boost is compiled for the other type.)
Re: Compiling spring (mingw and visual studio 7/8)
It seems to be:
Spring Wiki says I should use "official MinGW + GCC 4.4.0" so I assume I have got a wrong version.
Getting the correct versions of all the stuff now.
I will post later if Spring finally builds or not.
"make > log.txt" FTW
(provided by a batch file found in google )gcc version 3.4.5
GNU Make 3.81
__MINGW32_VERSION 3.15.2
__W32API_VERSION 3.13
Spring Wiki says I should use "official MinGW + GCC 4.4.0" so I assume I have got a wrong version.
Getting the correct versions of all the stuff now.
I will post later if Spring finally builds or not.
Edit: Nevermind this one, I am noob afraid of the command line...Rafal99 wrote:And btw does MinGW save compile logs somewhere?
"make > log.txt" FTW
Re: Compiling spring (mingw and visual studio 7/8)
I installed the latest MinGW and GCC 4.4.0 but the same thing happened again while linking.
I have found that there are some conflicts in my PATH environment variable and in some other places (damn Dev-Cpp spammed its path everywhere), and the wrong stuff is used. When finally I managed to fix all that problems Spring builds successfully.
Thanks for help!
I have found that there are some conflicts in my PATH environment variable and in some other places (damn Dev-Cpp spammed its path everywhere), and the wrong stuff is used. When finally I managed to fix all that problems Spring builds successfully.
Thanks for help!
Re: Compiling spring (mingw and visual studio 7/8)
It is not actually obvious under 2008. __stdcall keyname forces to decorate exported AI functions under 2008. Even if you wrap them with extern "C" it does not help. So, you have to link a .def file which "patches" __stdcall decorations with contents like this:hoijui wrote:AF, you might check out the wiki, and try the most obvious spot: development - windows - visual studio
Code: Select all
EXPORTS
getLevelOfSupportFor
init
release
handleEvent
Re: Compiling spring (mingw and visual studio 7/8)
The link in the first post is 404, may need updating.
The correct one seems to be:
http://springrts.com/wiki/Building_spring
Edit: Wow! Getting Mingw to work is so much easier these days, thanks to TDM installer.
The correct one seems to be:
http://springrts.com/wiki/Building_spring
Edit: Wow! Getting Mingw to work is so much easier these days, thanks to TDM installer.
Re: Compiling spring (mingw and visual studio 7/8)
This the output from stderr after running "mingw32-make install-spring". The last 2 lines in in stdout were:
Code: Select all
Linking CXX executable ..\..\..\spring.exe
Creating library file: libspring.dll.a
Any idea what is wrong and how to fix?
Re: Compiling spring (mingw and visual studio 7/8)
i do not know if it is this, but as much as i know, the last mingw tdm reported to work well for compiling spring is 4.5. i had problems with 4.6 aswell, when i tried. i though the wiki mentions this, though.
Re: Compiling spring (mingw and visual studio 7/8)
The wiki (at least the Compiling Spring on Windows page) doesn't mention anywhere that mingw version 4.5 has to be used. I checked two times.
So thanks for the tip, I will try installing the tdm with 4.5 and we will see if this was the cause of errors. If it really was then wiki has to be more specific because right now it is logical to assume that the latest version is best and should be used.
So thanks for the tip, I will try installing the tdm with 4.5 and we will see if this was the cause of errors. If it really was then wiki has to be more specific because right now it is logical to assume that the latest version is best and should be used.
Re: Compiling spring (mingw and visual studio 7/8)
I tried compiling with Mingw 4.5.2 and still exactly same errors.
An another player who tried to compile on Windows told me in lobby that he got the same errors too.
Any help?
An another player who tried to compile on Windows told me in lobby that he got the same errors too.
Any help?
Re: Compiling spring (mingw and visual studio 7/8)
it looks like for some reason the linker flags seems to be invalid:
http://vladimir_prus.blogspot.com/2009/06/linking-101.html
can you attach CMakeCache.txt ?
here i tried with mingw gcc 4.6.1 and it works fine (should be the current version)... strange :-/
http://vladimir_prus.blogspot.com/2009/06/linking-101.html
can you attach CMakeCache.txt ?
here i tried with mingw gcc 4.6.1 and it works fine (should be the current version)... strange :-/
Re: Compiling spring (mingw and visual studio 7/8)
make VERBOSE=1 shows commands that are done to link...
it looks like -lboost_system-mt is missing in the linker command line but the CMakeCache.txt looks imo fine...
it looks like -lboost_system-mt is missing in the linker command line but the CMakeCache.txt looks imo fine...
Re: Compiling spring (mingw and visual studio 7/8)
<FOOBAR>
->
It does quite well mention what you have to install ...Rafal99 wrote:The wiki (at least the Compiling Spring on Windows page) doesn't mention anywhere that mingw version 4.5 has to be used. I checked two times.
->
</FOOBAR>wiki wrote:Because the official MinGW installer and packages are outdated, we recommend to use the TDM web-installer instead, to install the official MinGW Stable (not TDM-GCC) package:
Re: Compiling spring (mingw and visual studio 7/8)
Mingw output with VERBOSE=1:
@jK:
TDM webdl installer was what I was using. It didn't know then that there is only one version of it which always gets the latest Mingw.
Anyway the point was hypothetical refering to hoijui post that Mingw GCC must be 4.5, but since it proved wrong, it is invalid.
Error output same as before.@jK:
TDM webdl installer was what I was using. It didn't know then that there is only one version of it which always gets the latest Mingw.
Anyway the point was hypothetical refering to hoijui post that Mingw GCC must be 4.5, but since it proved wrong, it is invalid.
Re: Compiling spring (mingw and visual studio 7/8)
mingw-gcc 4.6.1-2 here and unable to compile due to boost errors too :
undefined reference to `boost::system::system_category()'
undefined reference to `boost::system::system_category()'
Re: Compiling spring (mingw and visual studio 7/8)
does adding
in
fix the linker error?
Code: Select all
#define BOOST_FILESYSTEM_VERSION 2
Code: Select all
mingwlibs/include/boost/config/user.hpp