Loading...
  OR  Zero-K Name:    Password:   

OFF TOPIC - Where does the spring rts source code start

23 posts, 1598 views
Post comment
Filter:    Player:  
Page of 2 (23 records)
sort
9 years ago
Ok, So I have spent around 1 hour of good time tring to familiarize myself with how the spring source code is layed out. And I am still lost. Can anyone tell me where does the application start (like the very very beginning). Something like the main() method. Or some other starting point.

Thanks in advance
+1 / -0


9 years ago
I'd bet some reputation that it's this.
+4 / -0
9 years ago
Thanks, ill take a look at that
+0 / -0
9 years ago
Just out of curiosity, what c compiler/editor do the spring developers use? That might help me import the entire project into the editor without much trouble...
+0 / -0


9 years ago
I've had some success playing with spring using either QTCreator or Eclipse CDT.

The compiler is gcc and the build system is cmake afair. But you can also use ninja, because ninja is pro.
+0 / -0
9 years ago
Something called cmake ... it is built on several platforms (linux, windoze) so there is a compiler for each.

And as for editors, probably what each person thinks best. Eclipse is pretty good though.
+0 / -0
OK... personally (no offense) I consider eclipse to be very unorganized with all the options everywhere. Very hard to get used to ... but thats the java version I was working with. (If working with java, pick intelij idea! Its 100x better than eclipse.) But Ill give the c++ version a try.
+1 / -0
9 years ago
I'll happily use vi or emacs in a terminal window if necessary.
+0 / -0

9 years ago
Cmake is used to generate build scripts. You have to use it.
Ninja is an alternative to the default "make" build system. Both are fine although for make I suggest you always run it with a -j4 at least (number specifies the amount of jobs in parallel and you want it high so all your CPU cores are used).

I use kate for all my development needs and it's pretty great. A good text editor with auto completion without having to setup anything: no projects, workspaces and all that junk. This is key for Spring as you'll often work on multiple different things - sometimes simultaneously: game, map, engine, lobby server/client, etc.
+0 / -0
CMake can generate project files for popular IDEs (VS, Codeblocks, and XCode to name a few).

https://www.johnlamp.net/cmake-tutorial-2-ide-integration.html
http://www.cmake.org/cmake/help/v2.8.8/cmake.html#section_Generators

But personally I use ST3 for 100% of the code that I write: http://www.sublimetext.com/3
+0 / -0


9 years ago
I had success with this page: https://springrts.com/wiki/Building_Spring_on_Windows
+0 / -0
9 years ago
Well, I tried to compile with the eclipse c/c++ compiler (i had no luck)
So I followed GoogleFrog's page and installed all those stuff.

I got this weird error and here is the error log
---------------------------start--------------------------------

Determining if the CXX compiler accepts the flag -fuse-ld=gold failed with the following output:
Change Dir: H:/JimmyCode/SpringRTS/build/CMakeFiles/CMakeTmp

Run Build Command:"C:/PROGRA~2/MINGW-~1/I686-4~1.1-P/mingw32/bin/mingw32-make.exe" "cmTC_cf8af/fast"
C:/PROGRA~2/MINGW-~1/I686-4~1.1-P/mingw32/bin/mingw32-make.exe -f CMakeFiles\cmTC_cf8af.dir\build.make CMakeFiles/cmTC_cf8af.dir/build

mingw32-make.exe[1]: Entering directory 'H:/JimmyCode/SpringRTS/build/CMakeFiles/CMakeTmp'

Building CXX object CMakeFiles/cmTC_cf8af.dir/DummyCXXFile.cxx.obj

C:\PROGRA~2\MINGW-~1\I686-4~1.1-P\mingw32\bin\G__~1.EXE -mwindows -fuse-ld=gold -o CMakeFiles\cmTC_cf8af.dir\DummyCXXFile.cxx.obj -c "C:\Program Files (x86)\CMake\share\cmake-3.3\Modules\DummyCXXFile.cxx"

Linking CXX executable cmTC_cf8af.exe

"C:\Program Files (x86)\CMake\bin\cmake.exe" -E cmake_link_script CMakeFiles\cmTC_cf8af.dir\link.txt --verbose=1

"C:\Program Files (x86)\CMake\bin\cmake.exe" -E remove -f CMakeFiles\cmTC_cf8af.dir/objects.a

C:\PROGRA~2\MINGW-~1\I686-4~1.1-P\mingw32\bin\ar.exe cr CMakeFiles\cmTC_cf8af.dir/objects.a @CMakeFiles\cmTC_cf8af.dir\objects1.rsp

C:\PROGRA~2\MINGW-~1\I686-4~1.1-P\mingw32\bin\G__~1.EXE -mwindows -fuse-ld=gold -Wl,--whole-archive CMakeFiles\cmTC_cf8af.dir/objects.a -Wl,--no-whole-archive -o cmTC_cf8af.exe -Wl,--out-implib,libcmTC_cf8af.dll.a -Wl,--major-image-version,0,--minor-image-version,0 @CMakeFiles\cmTC_cf8af.dir\linklibs.rsp

collect2.exe: fatal error: cannot find 'ld'

compilation terminated.

mingw32-make.exe[1]: * [cmTC_cf8af.exe] Error 1

CMakeFiles\cmTC_cf8af.dir\build.make:98: recipe for target 'cmTC_cf8af.exe' failed

mingw32-make.exe[1]: Leaving directory 'H:/JimmyCode/SpringRTS/build/CMakeFiles/CMakeTmp'

mingw32-make.exe: * [cmTC_cf8af/fast] Error 2

Makefile:125: recipe for target 'cmTC_cf8af/fast' failed
---------------------------------end---------------------------
If you have read this code properly then you will find out some of my not-so-important personal information.... but who cares

I can't post the cmakeoutput.log because its toooo long
+0 / -0

9 years ago
There are some issues with your system: you're missing the linker.
+2 / -0

9 years ago
Wow.
Some people still didn't get the obvious- )
+0 / -3


9 years ago
And the "obvious" thing is?
+0 / -0
9 years ago
"collect2.exe: fatal error: cannot find 'ld'"

Generally the first line with error...
+1 / -0
9 years ago
ld (or on window/mingw: ld.exe) is the linker. It is the program that binds all the individual object files, static libraries and dynamic libraties into an executable. As gajop said, you must have done something wrong with the installation of mingw, it should include a linker. And no, you cannot use the one from visual studio.
+1 / -0
9 years ago
ok ... so most likely i am missing a linker ...

so what did I do wrong?
I followed the instrructions from the spring website that google frog gave me
+0 / -0
1) Check that your installed mingw-w64 has ld.exe like in
C:\Program Files (x86)\mingw-w64\i686-5.2.0-posix-sjlj-rt_v4-rev0\mingw32\bin
2) Check that "C:\Program Files (x86)\mingw-w64\i686-5.2.0-posix-sjlj-rt_v4-rev0\mingw32\bin" is set in PATH env var.
3) Check that no other ld.exe interferes with mingw-w64's

Optional:
4) Reboot.
5) Uninstall windoze, install IDE called linux.
+1 / -0
9 years ago
quote:

Optional:
4) Reboot.
5) Uninstall windoze, install IDE called linux.

Alternative:
- download VMWare player and install
- download a netinst ISO for mint or debian
- install Linux in a virtual machine.
Or the other way around:
- install Windoze in a VMWare player running under Linux
And as an alternative for VMWare player there is VirtualBox.
+1 / -0
Page of 2 (23 records)