News:

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

Two patches to fix compilation on mac

Started by ArthurDenture, October 19, 2014, 04:40:01 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ArthurDenture

I just noticed the new configure.ac. This is a great idea: I always thought it was unfortunate that when a new user tries to compile simutrans from source, the first thing they have to do is learn about a custom build scheme, edit a config file, etc. I hope that this mode becomes the default!

Anyhow, here are two short patches related to compilation on OS X.

1. Autoconf didn't quite work out of the box on my macbook, since it tried to compile an Objective-C++ header file without switching to objc++ mode. (See patch file or Github for full commit message.)
Link: https://github.com/artdent/simutrans/commit/2fd964e56f914d4665fc4717ad26f66376905664
Also attached.

2. Compilation didn't succeed with multithreading enabled. I think this is only a problem on Lion and above. (Again, patch for full commit message.)
Link: https://github.com/artdent/simutrans/commit/7658f6f431ba03c9aeeae5039739a91b71451489
Also attached.

Edit: just noticed I used "and" instead of "&&" in patch #2. Bizarrely, the preprocessor seemed to accept it? Anyhow, patch and link updated.

Ters

Quote from: ArthurDenture on October 19, 2014, 04:40:01 PM
Edit: just noticed I used "and" instead of "&&" in patch #2. Bizarrely, the preprocessor seemed to accept it? Anyhow, patch and link updated.

and is a valid C++ keyword, with the same meaning as &&. I don't remember if it is valid C as well, and I don't know about Objective-C.

prissi