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

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
User avatar
QMan
Posts: 103
Joined: 17 Feb 2006, 01:10

Post by QMan »

One more problem. During linkage, it complains about a missing "def_generated.def" file in the GlobalAICInterface folder. Any ideas on this?
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

About the crashrpt, that was removed because it isn't used in the released spring.exe. I didn't realize the code still used it when compiling on MSVC... Since it (crashrpt) never changes you could just copy it from b2 or rip the crashrpt code out of spring (can probably be done by modifying the #ifdef's a minor bit), since you probably wont need it anyway, right?
User avatar
QMan
Posts: 103
Joined: 17 Feb 2006, 01:10

Post by QMan »

QMan wrote:One more problem. During linkage, it complains about a missing "def_generated.def" file in the GlobalAICInterface folder. Any ideas on this?
So I figured out I had to compile the GlobalAIInterfaces C# project and run the generate.bat batch file to fix this.

Now I get errors about a bad link in streflop

Code: Select all

Random.obj : error LNK2019: unresolved external symbol "float __cdecl streflop::Random<1,0,float>(float,float,struct streflop::RandomState &)" (??$Random@$00$0A@M@streflop@@YAMMMAAURandomState@0@@Z) referenced in function "float __cdecl streflop::NRandom_Generic<float>(float *,struct streflop::RandomState &)" (??$NRandom_Generic@M@streflop@@YAMPAMAAURandomState@0@@Z)

streflop_gateway.obj : error LNK2001: unresolved external symbol "float __cdecl streflop::Random<1,0,float>(float,float,struct streflop::RandomState &)" (??$Random@$00$0A@M@streflop@@YAMMMAAURandomState@0@@Z)

E:\AIDesign\TASpring74DEV\spring.exe : fatal error LNK1120: 1 unresolved externals
Any ideas on this?

EDIT: Nevermind, found the fix on the previous page. :)
User avatar
QMan
Posts: 103
Joined: 17 Feb 2006, 01:10

Post by QMan »

Ok, got a new problem. I got spring compiled and working just fine, but when compiling my AI in VC++, I get wrong AI DLL error messages. I tracked this down to different sizes of some standard classes (string, vector, etc). Any ideas why the same copy of VC++ would produce different results for sizeof(std:string)?

In the spring copy it is 28 bytes, and in my AI it is 32 bytes. These mismatches cause the AI DLL error.

-QMan
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

QMan wrote:I saw this note on the DirectX SDK download page:
If you encounter compilation issues related to the DirectX headers, make sure that the include directories in Visual Studio are set correctly. On the Win32 platform, make sure that there is a reference to the DirectX headers. Either "$(DXSDK_DIR)include" or "c:\program files\microsoft DirectX SDK (February 2007)\Include" should appear in the include directory "$(VCInstallDir)Include."
The place for these is in:

Tools
Options
Projects and Solutions
VC++ Directories
Include (drop down box)
How do I do that with MinGW32/Dev-C++?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

I got the same issue. I manually modified aibase.h to give the value 0 rather than sizeof(...) and it started NTai then crashed at the first attempt to access a string value.

I believe this is because of the debug NTai + release spring and that if both had the same debugging data then they'd work fine at runtime.
User avatar
Rayden
Posts: 377
Joined: 01 May 2005, 13:15

Post by Rayden »

i'm encountering 4 error when trying to compile:

2 are the directSound Header problem which is mentionned on page before.

1 is

Code: Select all

c1xx : fatal error C1083: Datei (Quelle) kann nicht ge├â┬Âffnet werden: "..\..\Rendering\UnitModels\Unit3DLoader.cpp": No such file or directory
I can't find this file.

And another one:

Code: Select all

c1xx : fatal error C1083: Datei (Quelle) kann nicht ge├â┬Âffnet werden: "..\..\System\SyncTracer.cpp": No such file or directory
Object.cpp
This file is existant, but isn't find ?!
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

Project file is outdated, you can remove Unit3DLoader.cpp (it was intentionally removed from SVN) from it. SyncTracer.cpp moved from rts/System to rts/System/Sync, so remove & readd it.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

I made a new mingwlibs package.

New stuff:
  • Python 2.5 headers and libraries. Not used by unitsync yet but I wanted to make it future proof :-)
  • Java headers, as preparation to including AF's unitsync java bindings.
  • SDL 1.2.11 (was 1.2.9)
  • ILU added, a Spring build dependency recently introduced by trepan
  • ILUT added, just for future proof-ness
  • Added readme (not much, but at least some info)
  • Added reimp_new.zip, containing the tool reimp.exe to create MinGW import libraries from MSVC import libraries (otherwise I keep googling for it everytime I update mingwlibs...)
Image
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Post by submarine »

i tried to build latest svn version with vs.net 2003 (as usual), added the 4 new files and committed the updated project file, however i get tzhe following linking error

rts error LNK2019: unresolved external symbol __imp__iluCrop@24 referenced in function "public: bool __thiscall Glyph::Outline(unsigned int)" (?Outline@Glyph@@QAE_NI@Z)
rts error LNK2019: unresolved external symbol __imp__iluBlurGaussian@4 referenced in function "public: bool __thiscall Glyph::Outline(unsigned int)" (?Outline@Glyph@@QAE_NI@Z)
rts error LNK2019: unresolved external symbol __imp__iluScaleColours@12 referenced in function "public: bool __thiscall Glyph::Outline(unsigned int)" (?Outline@Glyph@@QAE_NI@Z)
rts error LNK2019: unresolved external symbol __imp__iluInit@0 referenced in function "public: __thiscall InitializeOpenIL::InitializeOpenIL(void)" (??0InitializeOpenIL@@QAE@XZ)

i cant figure out the source file containing these functions :(

or are my precompiled libraries outdated?
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

They are outdated, recently trepan added a dependency upon ILU. This library is in the devil package. Just grab it there yourself until someone updates vclibs package:

http://prdownloads.sourceforge.net/open ... p?download
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Post by submarine »

i replaced the old devil lib(include with teh new files, but i still get the same error? is there any specific devil version i should use (trief with 1.6.8 rc2)?
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

Have you updated the project to link with ILU.dll?
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Post by submarine »

*ouch*

yep i forgot that :)
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

new mingwlibs
  • should fix the problems (at least) KDR_11k experienced using mingwlibs-v6
  • and fixes problems I experienced when building Spring in crosscompiled MinGW GCC 4.3.0 (20070418 SVN).
Image
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

Remember to run "scons configure" when libs are added (or rts\build\scons\config.py is updated). Fixed those ilu* errors during linking for me.
Raphael
Posts: 10
Joined: 24 Apr 2007, 18:55

Post by Raphael »

hello

i am trying to compile spring using visual c++ 2005, however i get the following two error messages:

Cannot open include file: 'GL/glu.h': No such file or directory

Cannot open include file: 'windows.h': No such file or directory

i did install directX sdk and platform sdk as suggested in the very first post, but i dont know what causes this error.

thanks in advance for helping me
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

It isnt enough to install the sdk's you have to reference them in your project file so it knows they exist and where to look.
Raphael
Posts: 10
Joined: 24 Apr 2007, 18:55

Post by Raphael »

i am stuck on this error:

"fatal error C1083: Cannot open source file: '..\..\System\SyncTracer.cpp': No such file or directory"

if i just copy the cpp from the Sync into the System folder, the after a while of compiling i get:
LINK : fatal error LNK1104: cannot open file '../../lib/ft/freetype2110_D.lib'

any ideas?
Raphael
Posts: 10
Joined: 24 Apr 2007, 18:55

Post by Raphael »

I am really sorry about asking more noobish questions, but im all new to C++ and such complex project environments.

Finally i got Spring to build. In the instructions on the first page it said that id have to set up the working directory, but which directory do i need to enter there?
Post Reply

Return to “Engine”