Experimental simsys_s.cc May 19, 2010, 03:17:10 pm WTF was done to Experimentals simsys_s.cc...System libraries included by hard coded paths....Ifdefs that result in the entire file skipping compilation....WTF???Restoring to the relevant code from Standard works just fine. Is there some reason for Experimentals butchery? Quote Selected
Re: Experimental simsys_s.cc Reply #1 – May 19, 2010, 10:47:26 pm I did this a long time ago to get it to work properly on my machine: I couldn't work out how to make it work without doing that. Note that only the SDL build on Windows is affected because of the use of conditional compilation. To which #ifdefs do you refer that result in the entire file being skipped? simsys_s.cc is only supposed to be used if Simutrans is compiled with SDL, not GDI. In most cases on Windows, GDI is preferable, but some people prefer SDL. The file is supposed to be ignored in Windows unless the pre-compiler directive "SDL" is specified. Quote Selected
Re: Experimental simsys_s.cc Reply #2 – May 19, 2010, 11:18:00 pm Quote from: jamespetts – on May 19, 2010, 10:47:26 pmI did this a long time ago to get it to work properly on my machine: I couldn't work out how to make it work without doing that. Note that only the SDL build on Windows is affected because of the use of conditional compilation. I would guess you either don't have the include paths set right in your compiler environment or have installed SDL in the wrong place.#include <SDL/SDL.h> should work. Hardcoding #include "../SDL-1.2.13/include/SDL.h" just breaks things for everyone else.The conditional compilation for all these target specific files is controlled in the makefile by config.default. i.e. Setting BACKEND=sdl results in simsys_s.cc being added to the source list.Quote from: jamespetts – on May 19, 2010, 10:47:26 pmTo which #ifdefs do you refer that result in the entire file being skipped? simsys_s.cc is only supposed to be used if Simutrans is compiled with SDL, not GDI. In most cases on Windows, GDI is preferable, but some people prefer SDL. The file is supposed to be ignored in Windows unless the pre-compiler directive "SDL" is specified.#ifdef SDL is encomp****ing the whole thing. SDL is defined inside a #ifndef WIN32 statement. This must not evaluate to true in my environment - MinGW, SDL.I also note WIN32 and _WIN32 both being used??? Quote Selected
Re: Experimental simsys_s.cc Reply #3 – May 20, 2010, 12:34:52 pm The include path of SDL can be easily added to the environment in MSVC. Especially, since everybody is free to them anyplace they like. Options->Environment Or manipulate the path in the inlude directoryies on the compiler properties Quote Selected
Re: Experimental simsys_s.cc Reply #4 – May 20, 2010, 11:38:50 pm Prissi - thank you for the advice. I have corrected this in the latest commit to the -devel branch. Quote Selected