The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: The Hood on January 07, 2009, 09:39:20 PM

Title: Compiling on Linux
Post by: The Hood on January 07, 2009, 09:39:20 PM
Hi, I'm trying to compile the source code on linux.  I get the following error:

===> LD  sim
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'
collect2: ld returned 1 exit status
make: *** [sim] Error 1

Any ideas how to fix this?  In case it makes any difference, I've attached my config.default - I'm not sure what settings I need for that!

Cheers
Title: Re: Compiling on Linux
Post by: prissi on January 07, 2009, 09:47:15 PM
Porbably no sdl installed. And the SDL_CONFIG= line should be commented. Actually, you can try to run "sh configure.sh" from simutrans/simutrans, which will generate (hopefully) a working config.default too.
Title: Re: Compiling on Linux
Post by: The Hood on January 07, 2009, 10:01:51 PM
I have libsdl installed, and commenting the SDL_CONFIG line still gives an error.

I can't find configure.sh - where do I get this from?

Edit: I've now managed to get it to work by reinstalling a newer version of sdl.  Thanks for the help.
Title: Re: Compiling on Linux
Post by: whoami on January 07, 2009, 10:16:44 PM
Please check whether all .c/.cc files could be compiled. The build process may not stop if one step failed.
Title: Re: Compiling on Linux
Post by: prissi on January 07, 2009, 10:21:00 PM
You do not have SDL_devel installed then. You need to install the developer libraries. SDL_config should not give an error on Linux, this line was only for mingw.
Title: Re: Compiling on Linux
Post by: The Hood on January 07, 2009, 10:32:41 PM
Thanks - see above, you guys responded while I was editing to say I'd managed to do it OK.
Title: Re: Compiling on Linux
Post by: jamespetts on January 10, 2009, 04:52:25 PM
Quote from: The Hood on January 07, 2009, 10:32:41 PM
Thanks - see above, you guys responded while I was editing to say I'd managed to do it OK.

Excellent, glad that you managed to compile! Have you been able to test the patches yet?