Skip to main content
Topic: Compiling on Linux (Read 4355 times) previous topic - next topic

Compiling on Linux

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

Re: Compiling on Linux

Reply #1
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.

Re: Compiling on Linux

Reply #2
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.

Re: Compiling on Linux

Reply #3
Please check whether all .c/.cc files could be compiled. The build process may not stop if one step failed.

Re: Compiling on Linux

Reply #4
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.

Re: Compiling on Linux

Reply #5
Thanks - see above, you guys responded while I was editing to say I'd managed to do it OK.

Re: Compiling on Linux

Reply #6
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?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.