Codeblocks

Codeblocks

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
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Codeblocks

Post by AF »

Im requesting a working method of building unitsync under windows that doesnt require VS2005 C++ express and a platform sdk download, OR me tearing my hair out in frustration seething with anger at codeblocks because I dont know how to get rid of the errors and which libraries and files to include.

I need a f*ckign 64bit unitsync.dll to continue AFLobby work and nobody who can compile it is doing so, and the whole thing is just borked. There arent even instructions on what is needed for unitsync.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

Use:

Code: Select all

scons configure
scons unitsync
unitsync.dll is then compiled into game/unitsync.dll

More verbose instructions are in the sticky thread on how to compile spring (follow the instructions using MinGW).
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

As far as I am aware scons doesnt not work under windows.

edit:: pfft devc++ crap
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

it does work under windows
User avatar
Relative
Posts: 1371
Joined: 15 Oct 2006, 13:17

Post by Relative »

imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Post by imbaczek »

works for me. Use msys for best effects.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Code: Select all

D:\spring_0.75b2>scons configure
scons: Reading SConscript files ...

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

Detected platform : windows
Checking gcc version... gcc not found
D:\spring_0.75b2>
I have everything needed. I dont have devc++ but I do have mingw32 installed at D:\MinGW\

there's also no config.log
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

Make sure gcc is in a directory which is in your PATH environment variable.

Does

Code: Select all

gcc --version
on the commandline work?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Code: Select all

D:\spring_0.75b2>scons configure
scons: Reading SConscript files ...

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

Detected platform : windows
Checking gcc version... 3.4.2
profiling NOT enabled, debugging NOT enabled, level 2 optimizing enabled

Configuring spring
Checking for zip... not found
D:\spring_0.75b2>
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

That's an already fixed bug, maybe grabbing the latest config.py from SVN works fine as a drop in replacement, otherwise just comment out the call to check_zip_version in the configure function in that file or update to latest sourcecode.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Post by imbaczek »

AF: get msys from mingw site and run scons from there.

tip: msys doesn't explicitly show drives, if you want to get to a directory outside of msys tree, you can cd /c/dir, e.g. cd /c/Documents and Settings/AF/[...]
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Ill try that tobi.

imbaczek, I just tried MSys and the post install gave an error, runnign myss gives me 128 terminal windows that promptly start closing them once they're all loaded
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

tobis fix worked but threw up another issue:

Code: Select all

Microsoft Windows [Version 6.0.6000]
Copyright (c) 2006 Microsoft Corporation.  All rights reserved.

C:\Users\AF-StandardUsr>d:

D:\>cd spring_0.75b2

D:\spring_0.75b2>scons configure
scons: Reading SConscript files ...

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

Detected platform : windows
Checking gcc version... 3.4.2
profiling NOT enabled, debugging NOT enabled, level 2 optimizing enabled

Configuring spring
Checking for Freetype2...
  Guessing Freetype2 include path... mingwlibs\include\freetype2
Checking for SDL...
  Guessing SDL include path... mingwlibs\include\SDL
Checking for Python 2.5...
  Guessing Python include path... mingwlibs\include\python2.5
Checking for Python 2.4...
  Guessing Python include path... mingwlibs\include\python2.4
Checking for Java...   Guessing Java include path... mingwlibs\include\java

Checking headers and libraries
Checking for C++ header file GL/gl.h... yes
Checking for main() in C library GL... no
Checking for main() in C library opengl32... yes
Checking for C++ header file GL/glew.h... yes
Checking for main() in C library GLEW... no
Checking for main() in C library glew32... yes
Checking for C++ header file GL/glu.h... yes
Checking for main() in C library GLU... no
Checking for main() in C library glu32... yes
Checking for C++ header file IL/il.h... yes
Checking for main() in C library IL... no
Checking for main() in C library devil... yes
Checking for C++ header file IL/ilu.h... yes
Checking for main() in C library ILU... yes
Checking for C++ header file SDL/SDL.h... yes
Checking for main() in C library SDL... yes
Checking for main() in C library SDLmain... yes
Checking for C++ header file boost/cstdint.hpp... yes
Checking for C++ header file boost/regex.hpp... yes
Checking for main() in C library boost_regex-gcc-mt... no
Checking for main() in C library boost_regex-mt... yes
Checking for C++ header file boost/thread.hpp... yes
Checking for main() in C library boost_thread-gcc-mt... no
Checking for main() in C library boost_thread-mt... yes
Checking for main() in C library dsound... yes
Checking for C++ header file ft2build.h... yes
Checking for main() in C library freetype... yes
Checking for main() in C library gdi32... yes
Checking for main() in C library imagehlp... yes
Checking for C++ header file jni.h... yes
Checking for main() in C library mingw32... yes
Checking for main() in C library ole32... yes
Checking for C++ header file Python.h... yes
Checking for main() in C library python2.5... no
Checking for main() in C library python25... yes
Checking for main() in C library winmm... yes
Checking for main() in C library wsock32... yes
Checking for C++ header file zlib.h... yes
Checking for main() in C library z... yes

Everything seems OK.  Run `scons' now to build.
scons: done reading SConscript files.
scons: Building targets ...
scons: Nothing to be done for `configure'.
scons: done building targets.
D:\spring_0.75b2>scons
scons: Reading SConscript files ...
g++ -c -O3 -pipe -g -frounding-math -fsignaling-nans -fno-strict-aliasing -mieee
-fp -Wall -mfpmath=387 -DSTREFLOP_X87=1 SMath.cpp -o SMath.o
SMath.cpp:9: warning: division by zero in `1.0e+0f / 0.'
SMath.cpp:10: warning: division by zero in `-1.0e+0f / 0.'
SMath.cpp:15: warning: division by zero in `1.0e+0 / 0.'
SMath.cpp:16: warning: division by zero in `-1.0e+0 / 0.'
SMath.cpp:24: warning: division by zero in `1.0e+0 / 0.'
SMath.cpp:25: warning: division by zero in `-1.0e+0 / 0.'
g++ -c -O3 -pipe -g -frounding-math -fsignaling-nans -fno-strict-aliasing -mieee
-fp -Wall -mfpmath=387 -DSTREFLOP_X87=1 Random.cpp -o Random.o
Random.cpp:982: warning: alignment of 'streflop::DefaultRandomState' is greater
than maximum object file alignment.  Using 16
make -C libm
make: *** [streflop.a] Error 2
Failed building streflop!
D:\spring_0.75b2>
Also D:\MinGW\include\java is not the java include path. There is no jni.h in there, rather a lot of java packages implemented in C/C++ for gcj. On my machine the correct location is C:\Program Files\Java\jdk1.6.0_02\include
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

Also D:\MinGW\include\java is not the java include path. There is no jni.h in there, rather a lot of java packages implemented in C/C++ for gcj. On my machine the correct location is C:\Program Files\Java\jdk1.6.0_02\include
That's why it uses mingwlibs\include\java and not D:\MinGW\include\java :P

Don't know why it fails building streflop at that point though, never seen that before. Some things to check for:

Is make in your PATH?
Is it the mingw32 make that is first in your path, not some other make program? (try make --version on commandline)
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Code: Select all

Microsoft Windows [Version 6.0.6000]
Copyright (c) 2006 Microsoft Corporation.  All rights reserved.

C:\Users\AF-StandardUsr>make --version
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for i686-pc-msys
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
        Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

Report bugs to <bug-make@gnu.org>.


C:\Users\AF-StandardUsr>
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Post by imbaczek »

Try newer gcc and newer binutils: http://sourceforge.net/project/showfile ... up_id=2435

3.4.2 is pretty old.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

same result
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Post by imbaczek »

doh. I'm out of ideas. Maybe it's Vista, but I have no way of checking. If you have a XP box somewhere, you might want to try there. You could also try upgrading win32api and mingw-runtime (not that I expect that to help...)
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

my recent upgrade has caused the compilr to give errors when compilign NTai with my exception handling macros turned on. It compiles fine with them turned off.
Post Reply

Return to “Engine”