Building spring in Visual Studio 7 (2003) Note: building spring in Visual Studio 7 is currently unsupport, these instructions are just here because the Visual Studio 8 instructions refer to them.
To build and run spring in visual studio (2003):
install the library package http://spring.clan-sy.com/dl/spring-vclibs.exe You need to install this in the "taspring_0.75b2" directory from the zipped source, or if you're using SVN, install it in "trunk" If done right, it will look like:
taspring_0.75b2/ taspring_0.75b2/rts taspring_0.75b2/omni taspring_0.75b2/... other dirs taspring_0.75b2/vclibs
install the DirectX SDK
open the project file. /rts/build/vstudio7/rts.vcproj
start building (usually you want to select the release build, debug is really too slow and is used only when you really know what you want to test)
select the working directory in the project properties, otherwise spring will crash on start
Building spring in Visual Studio 8 (2005) (possibly the free Express Edition)
Building spring in visual studio 8 is very similar to visual studio 7. The differences are: - use http://spring.clan-sy.com/dl/spring-vc8libs.exe , instead of spring-vclibs.exe - use the visual studio 8 project file: /trunk/rts/build/vstudio8/rts.vcproj - you will need to install the Platform SDK and DirectX SDK, and set up the directories of those correctly within visual studio.
Except for TortoiseSVN, which can be replaced by the commandline svn client or SmartSVN and Dev-Cpp, which can be replaced by a bare MinGW system, the listed programs are a must-have if you want to compile spring with MinGW/Dev-Cpp.
Make sure C:\Python24 and C:\Dev-Cpp\bin are in your PATH environment variable. Make sure a MINGDIR environment variable with value C:\Dev-Cpp exists. (change paths where appropriate.) Set environment variables by: Start -> Settings -> Control Panel -> System -> Advanced -> Environment variables (for Windows XP).
Checkout the TA Spring SVN repository.
Open a console (Start -> Run -> cmd.exe -> Run), cd \path\to\taspring<enter> (where you checked it out in the previous step) and type scons configure<enter>, followed by scons<enter>. Refer to scons --help for options which can be passed to scons configure.
Copy over datafiles and stuff from official spring to the game dir (where spring.exe is created).
Copy missing DLLs from mingwlibs/dll.
Crosscompiling spring using i586-mingw32msvc-gcc First, grab the source, and make sure you have MinGW installed on your Linux box (on Ubuntu/Debian just install the mingw32 package).
Then follow this quick 'n dirty instructions:
cd /path/to/checkout/trunk wget http://www.osrts.info/~tvo/spring-mingwlibs-v4.exe 7z x spring-mingwlibs-v4.exe MINGDIR=/usr/i586-mingw32msvc \ CC=i586-mingw32msvc-gcc \ CXX=i586-mingw32msvc-g++ \ scons configure platform=windows && scons
Last edited by knorke on 31 Dec 2011, 00:04, edited 11 times in total.
Do not try compiling spring with codeblocks+the free MS compiler. Get VS .Net 2005 enterprise edditiona dn try that out though, it's free as far as I know but only for so long so dont leave it for ages.
Also you'll ahve to recompile all the dll's (primarily groupAI and GlobalAI) udner the new compiler to get them working.
1> Message: 'This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.' taspring\rts\rendering\unitmodels\unit3dloader.cpp(285) : warning C4996: 'sprintf' was declared deprecated
rts\sim\units\commandai\factorycai.cpp(192) : warning C4996: '_snprintf' was declared deprecated 1> d:\program files\microsoft visual studio 8\vc\include\stdio.h(339) : see declaration of '_snprintf'
warning C4996: 'fopen' was declared deprecated
rts\system\platform\win\avigenerator.cpp(294) : error C2668: '_tcsstr' : ambiguous call to overloaded function
rts\rendering\map\bfgroundtextures.h(8) : fatal error C1083: Cannot open include file: 'jpeglib.h': No such file or directory
rts\game\ui\sharebox.cpp(74) : warning C4101: 'x' : unreferenced local variable
i fixed all of the errors except the ambiguous call to overload error.
I guess you can use #pragma warning(disable : 4996) but do you want to?
well i found out last night that boost hadn't completly built after commenting out that pesky ambigious type cast in the avi code (i've never used the avi stuff), and I battled with bjam for a couple hours which seems to create temp files to exec shell commands like mkdir and copy (ewwwwww). Bjam seems like a retarded make to me but what do i know. It produced 1GB of files to build, so i see your point about blote. It then just started to only run one command at a time, it got worse and worse. I was using the VS2005 command prompt, which i assumed was the same as the normal command prompt. I though it was just the env that was different. After screwing with %TEMP% and %TMP% and a ton of other stuff i got boost to build by running it in the standard cmd window. I though now it fill finally link, but of course M$ fucked me again, and it just so turns out that libc.lib is no longer supported. FUCK. That's where i'm stuck today, I though java was a pain in the ass with the way it dealt with libs, but this is crazy. Unfortunatly i don't have a copy of the libs from VS2003 and i don't know how it will complete linking unless i can figure out what was using libc in the first place. Any ideas?
P.S. I don't remember the java build env being this hard to get running.
It's sometime ago that I build boost, but I remember something about either going in the seperate module directories themself and building threads/filesystem/regex directly, or using something like this:
Which I kept in a BAT file, but I have no idea if it works now.
Essential is that you abort as soon as it starts building WAVE, because that produces 60 mb of library per configuration :S
That aside since you managed to build boost already (It could be useful to others).... chances are that LIBC is just renamed (Maybe libcrt,...libc* or something) The warning shows fopen is deprecated, but deprecated stuff is usually still avaiable, so a libc implementation has to be somewhere in the 2005 directories I guess. Good luck anyway, I never expected VS 2005 to give such problems :S
I think m$ wants you to use libci.lib which is the newer one for /MT but from what i've read they also want to prevent multiple crts being used so they do not include the older libc.lib in VS2005 or the platform SDK. I think GLUT is causing this, but i'm not 100% sure. Turning on /NODEFAULTLIB and /NODEFAULTLIB:libc.lib generates tons of errors, i'm still digging
Spring doesn't need glut...
And most libraries that it links to are DLL export libaries:
SDL, opengl32, glu32, devil, zlibwapi, glew are all DLL lib files, however it links to a static lib of freetype and SDLmain, so that's where the references to libc might be I think.
I am using the free copy of Visual C++ 2005 off the Microsoft website. RTS finally compiles, but it is asking for LIBC.lib. I read greenail's instructions, but I don't understand them. Would you please give this C++ newbie a little more help? Thanks.
If anyone wants a copy of boost compiled for VS8.0 I'd be happy to send it. I just don't have any web space.
i gave up on VC8 and tried to compile with codeblocks and the 2003 VC7_1 toolkit, it puked on linking in 2 places. Debug puked by not finding a freetype object during linking, and release puked with some other linking error. I am starting to think i need to aquire a real version unless someone wants to help me with codeblocks. I can post the actual error messages (code blocks doens't let you copy the error text out of the gui!!!!)
Users browsing this forum: No registered users and 1 guest
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum