News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

Compiling with Clang

Started by jamespetts, March 24, 2013, 11:35:35 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jamespetts

In a post in the Experimental forum, M. Collett writes about the difficulties in getting the latest Experimental release candidate to compile with Clang, a compiler used by default in the latest version of Mac OS X. It seems that several of these difficulties apply also to Standard, since they are present in code that is unchanged from Standard, so I thought that it might be useful to alert the Standard developers to the fact. I hope that this is helpful. The solutions to the compile issues are also addressed.
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.

Dwachs

thanks for reporting. I committed the alloca - fix, the other issues were experimental-specific, the crash with gui_button is not reproducable in standard (at least by me).
Parsley, sage, rosemary, and maggikraut.

tlp

Can the #include <alloca.h> be replaced with #include <stdlib.h>? Clang is also the default on FreeBSD 10 but alloca.h does not exist there and stdlib.h should work on MacOS too according to https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man3/alloca.3.html

Dwachs

changed. hope this works now.
Parsley, sage, rosemary, and maggikraut.