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

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
monohouse

Post by monohouse »

anyone got any good compiler optmization switches for an Athlon XP on VS .NET 2003 ?

btw VS7, VS. NET 2003 and VS 2003 Pro are the same thing ?

this sucks, nothing works, not mingw and not VS7, i give up compiling until some instruction here actually produce working results.

also btw, I don't think that needing a commercial software to compile a open source project looks good for you. not an optimal idea I think.
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

many people have succeeded, so you're just doing something wrong. The release version is even compiled on vs7.
User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Post by Das Bruce »

monohouse wrote:also btw, I don't think that needing a commercial software to compile a open source project looks good for you. not an optimal idea I think.
You don't need commercial software, its just developed on it so the devs can make sure it compiles easier.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

monohouse wrote:also btw, I don't think that needing a commercial software to compile a open source project looks good for you. not an optimal idea I think.
Get Linux/MinGW. Compile spring. No commercial software needed at all.
User avatar
PauloMorfeo
Posts: 2004
Joined: 15 Dec 2004, 20:53

Post by PauloMorfeo »

monohouse wrote:...
also btw, I don't think that needing a commercial software to compile a open source project looks good for you. not an optimal idea I think.
Last time i built it, it was with Suse Pro 9.3. Pretty free.
monohouse

Post by monohouse »

can't you just post custom builds ?
I know of this project that manges to do it well : http://www.hard-light.net/
you can see that the stickies show very well some custom builds made by some people, as you can find here : http://www.hard-light.net/forums/index. ... ,97.0.html

there are many projects that have custom and CVS builds available, which would solve the problem of needing to compile anything, at least in part.
jnnnnn
Posts: 16
Joined: 25 Oct 2006, 11:14

Post by jnnnnn »

My steps to compile using VS8 (I just tried this today):
  • 1. Install Microsoft DirectX SDK (August 2006) and Microsoft Platform SDK for Windows Server 2003. (Big download).
    2. Get the source.
    3. Open the VS8 project file in rts/build/. Change the project properties:
    • 1. under Configuration Properties | C/C++ | General , add the two include directories as appropriate for the SDKs installed above.
      2. under Configuration Properties | Linker | General, add the two library directories as appropriate for the SDKs installed above.
      3. under Configuration Properties | Linker | Input, set "Ignore Specific Library" to "LIBC.lib".
    4. Start the build and pray :)
Note that the source is occasionally in a state that doesn't compile.
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

That way everyone will end up with a different project file because people install the SDKs at different places. It's better to use the Tools menu, and use the paths for all the projects. Tools->Options->Projects and Solutions->VC++ Directories

Select "Include files" in the "Show directories for" dropbox, and add the include paths from the SDKs,
Select "Library files" in the "Show directories for"dropbox, and add the lib paths from the SDKs.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

The above is how I finally did it. My compiles always end up being much smaller than the final versions, though, and NanoBlobs still makes them crash. Any ideas why? It's very weird- I get a working app., except with S3O stuff.
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

Did you compile everything? Perhaps the s3o stuff was left out...
User avatar
hughperkins
AI Developer
Posts: 836
Joined: 17 Oct 2006, 04:14

Post by hughperkins »

rts/map/readmap.h contains non-ASCII characters in the comments, which throws up warnings when compiled in non ISO-8859-1 locale. Could be worth saving it as UTF-8?
Last edited by hughperkins on 10 Nov 2006, 21:15, edited 1 time in total.
User avatar
hughperkins
AI Developer
Posts: 836
Joined: 17 Oct 2006, 04:14

Post by hughperkins »

jcnossen wrote:many people have succeeded, so you're just doing something wrong. The release version is even compiled on vs7.
With the easy availability of Visual C++ 2005 Express and the demise of the Visual C++ Toolkit 2003, is it time to start considering changing the release builds to VC2005?
User avatar
hughperkins
AI Developer
Posts: 836
Joined: 17 Oct 2006, 04:14

Post by hughperkins »

DirectX SDK is a 500MB download. It's only used by DxSound.h.

Perhaps we could push DxSound.h into a separate library or dll which would remove the need for the DirectX SDK for many people?
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

hughperkins wrote:With the easy availability of Visual C++ 2005 Express and the demise of the Visual C++ Toolkit 2003, is it time to start considering changing the release builds to VC2005?
We will change to MinGW, because MinGW GCC vs Linux GCC sync works much better then MSVC vs GCC sync.
User avatar
hughperkins
AI Developer
Posts: 836
Joined: 17 Oct 2006, 04:14

Post by hughperkins »

Tobi wrote:
hughperkins wrote:With the easy availability of Visual C++ 2005 Express and the demise of the Visual C++ Toolkit 2003, is it time to start considering changing the release builds to VC2005?
We will change to MinGW, because MinGW GCC vs Linux GCC sync works much better then MSVC vs GCC sync.
Careful. msvc works much better than mingw on Windows.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

What are the problems with MinGW compiled executables then? Besides some things which are already solved I dont know any.
User avatar
hughperkins
AI Developer
Posts: 836
Joined: 17 Oct 2006, 04:14

Post by hughperkins »

Tobi wrote:What are the problems with MinGW compiled executables then? Besides some things which are already solved I dont know any.
*Visual Studio Express is a convivial development environment
*msvc compiles significantly faster than mingw
*mingw is incompatible with the GlobalAI .Net interface because doesnt support Managed C++
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Post by Kloot »

I'm sorry, but 1 and 2 are merely convenient, not arguments against switching to mingw. As for your third point, there are currently no managed c++ extensions for gcc either, so sticking with msvc just so people who compile Spring on Windows can run .net AI's whilst sacrificing inter-platform operability (mingw obviously follows the same rules as gcc, msvc very much doesn't) seems a little... misprioritized?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Maybe this is just the excuse you need for writting those mono bindings =p

However I will greatly miss VS 2003 in moving AI dev to mingw32 =(
User avatar
hughperkins
AI Developer
Posts: 836
Joined: 17 Oct 2006, 04:14

Post by hughperkins »

Don't underestimate the importance of convenience.

A key issue here is ABI-incompatibility across C++ compilers. Using a C++ interface means that compiling spring core in mingw forces all AI development in mingw, and compiling it in VC2003 forces all AI development in VC2003.

The GlobalAI interface is essentially a C interface wrapped in C++ classes. If we were to reduce the GlobalAI interface to a pure C-interface the ABI-incompatibility issues would go away.
Post Reply

Return to “Engine”