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

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
colorblind
Spring Developer
Posts: 374
Joined: 14 Mar 2005, 12:32

Post by colorblind »

I tried compiling Spring on Visual C++ 2005 Express Edition, but to no avail.
The compiler reports that it can't find header files (such as glew's), but I've got the vclibs in the correct directory. So I guess it's a project setting I have to fix.

Has anyone had any luck compiling it on Visual C++ 2005 Express Edition?
(btw, I tried that particular IDE because it's free.)
am0kk
Posts: 14
Joined: 11 Jul 2006, 07:51

Post by am0kk »

I got it to compile, but it took me about 3 weeks to get it working...

I found that some of the libs in the in the project are pointing to a version that isnt there...

Mine was referencing SDL 1.2.8, the SDL in the VCLIBS package was 1.2.9
Also was referencing a different version of Boost compared to what was in the lib...


There are some steps a few pages back regarding the Platform sdk which you need to do aswell.

Good luck!

If you want, i can email you my project... not sure if it still compiles tho.. ( havent compiled since last week when i updated the svn... )
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

bah that vstudio8 project file in SVN was horribly outdated

I think it should work now (here it does). Use it with the precompiled boost libraries posted by EW.
colorblind
Spring Developer
Posts: 374
Joined: 14 Mar 2005, 12:32

Post by colorblind »

Ok, I'll give it one more try. Too bad I deinstalled VS Express Edition already :(.
User avatar
Acidd_UK
Posts: 963
Joined: 23 Apr 2006, 02:15

Post by Acidd_UK »

.\Release\AdvTreeGenerator.obj : fatal error LNK1136: invalid or corrupt file
r1857

Any ideas?
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

just a corrupted file, it will be regenerated when you rebuild
colorblind
Spring Developer
Posts: 374
Joined: 14 Mar 2005, 12:32

Post by colorblind »

My VC++ Express still complains it can't find "GL/glu.h" and "windows.h". Do I need to install the MS Platform SDK? (I'd rather don't, as it's 1.5 gigs).
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

Yes :|
colorblind
Spring Developer
Posts: 374
Joined: 14 Mar 2005, 12:32

Post by colorblind »

Installing the Platform SDK wasn't that bad after all. You only need the core files, and of those only the Build Envirenmont, which comes to 87mb.

Compiling away with MVSC++ Express ... :) (I do get a lot of type mismatch warnings though).

Btw, shouldn't the first page be updated a bit for MVSC++ Express? Getting the free IDE, the VCLibs, the modified Boost libraries and the MS Platform SDK isn't on it right now.

E: Oops I forgot to mention the DX SDK, which you'll need for dsound.h ...
Perhaps it's a good idea to combine the header files you'll need on windows and which aren't yet in the VClibs package into a new package.
alik83
Posts: 82
Joined: 08 Sep 2004, 15:32

strange compile error

Post by alik83 »

Been trying to compile the latest SVN, got this never-happened-before error.
First I should say I had to add the include path to the boost headers (1-33-1) to start compile.
After some files compiled, the "generating code" message and stuff I got this:

Code: Select all

C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\cmath(21): error C2039: 'ldexp' : is not a member of 'operator``global namespace'''

C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\cmath(21): error C2873: 'ldexp' : symbol cannot be used in a using-declaration

C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\cmath(22): error C2039: 'modf' : is not a member of 'operator``global namespace'''

Probably has smth to do with the right math.h include or I'm doing smth wrong, anybody knows? [/code]
I use VC7 (2003), maybe the project file wasn't updated correctly...
patmo98
Posts: 188
Joined: 09 Jan 2006, 17:51

Re: strange compile error

Post by patmo98 »

alik83 wrote:Been trying to compile the latest SVN, got this never-happened-before error.
First I should say I had to add the include path to the boost headers (1-33-1) to start compile.
After some files compiled, the "generating code" message and stuff I got this:

Code: Select all

C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\cmath(21): error C2039: 'ldexp' : is not a member of 'operator``global namespace'''

C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\cmath(21): error C2873: 'ldexp' : symbol cannot be used in a using-declaration

C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\cmath(22): error C2039: 'modf' : is not a member of 'operator``global namespace'''

Probably has smth to do with the right math.h include or I'm doing smth wrong, anybody knows? [/code]
I use VC7 (2003), maybe the project file wasn't updated correctly...
I don't know if the VS7 project was updated after the merge with tvo3. It looks like jcnossen might have fixed it at 9:00AM 19th PST.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

scons: Reading SConscript files ...

Now configuring. If something fails, consult `config.log' for details.

Detected platform : windows
Checking cl version... cl not found
What am I doing wrong?
patmo98
Posts: 188
Joined: 09 Jan 2006, 17:51

Post by patmo98 »

KDR_11k wrote:
scons: Reading SConscript files ...

Now configuring. If something fails, consult `config.log' for details.

Detected platform : windows
Checking cl version... cl not found
cl is the command-line compiler used by visual studio. Are you trying to use visual studio or gcc to compile spring?
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

It's mingw.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

Make sure you set the MINGDIR environment variable correctly (to the path of your MinGW/Dev-Cpp install), then it will detect MinGW and not just default to MSVC.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

That's set to the Dev-Cpp directory.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

And do you have VC installed too?

If so, make sure the vcvars.bat isn't executed on system start.
If not, I'm out of clues atm.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Nope, no VC.
Fnordia
Former Engine Dev
Posts: 425
Joined: 13 Aug 2004, 16:11

Post by Fnordia »

I had the same problem I believe when I was trying to build with mingw a while back.. I didn't investigate it, but the following workaround got it to compile for me.

In the main SConstruct file, I had to change

env = Environment(tools = ['default', 'rts'], toolpath = ['.', 'rts/build/scons'])

into

env = Environment(tools = ['mingw', 'rts'], toolpath = ['.', 'rts/build/scons'])
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Ah, I found the problem: Path must include Dev-Cpp\bin, not Dev-Cpp
Post Reply

Return to “Engine”