News:

Do you need help?
Simutrans Wiki Manual can help you to play and extend Simutrans. In 9 languages.

Compiling on Linux

Started by The Hood, January 07, 2009, 09:39:20 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

The Hood

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

prissi

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.

The Hood

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

whoami

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

prissi

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.

The Hood

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

jamespetts

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?
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.