The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: VS on January 03, 2009, 05:43:00 PM

Title: [patch] Issues compiling Makeobj with MSVC
Post by: VS on January 03, 2009, 05:43:00 PM
Msvc treats a .c file as a C source (why not) and forbids declarations in any place. Why it works elsewhere escapes me.

This patch moves some declarations upwards so that the code compiles.
Title: Re: [patch] Issues compiling Makeobj with MSVC
Post by: prissi on January 03, 2009, 07:36:20 PM
MSVC failed to compile a working executable of makeobj until 6.0. Later version were never tested. I will look into it.
Title: Re: [patch] Issues compiling Makeobj with MSVC
Post by: VS on January 03, 2009, 08:12:18 PM
Well, I tested it with the project files uploaded (newly) to the stickied thread. It compiles, links, and works. Didn't test the pak-files, though...

Only 1 declaration of variable is in the middle of block and must be moved to beginning. That is the patch.
Title: Re: [patch] Issues compiling Makeobj with MSVC
Post by: jamespetts on January 03, 2009, 08:30:10 PM
Thank you for fixing this one!