Bonus question: RnD can be compiled x64 too?
Yes, R'n'D should work just fine when compiled for 64 bit systems.
I'm just using the 32 bit version for the Windows build for compatibility with existing 32 bit Windows systems (as it works with both 32 and 64 bit Windows systems).
Unfortunately the batch files that do (and pass the SDL2 check) make other errors:
...
conflicting types for 'boolean'
Apparently the Windows platform is not correctly detected. You could try to uncomment the line "typedef int boolean" from file "src/libgame/types.h", but you will then probably run into other errors.
The reason why your Windows platform is not correctly detected is probably this piece of code in "src/libgame/platform.h":
Code: Select all
#if defined(WIN32) || defined(_WIN32)
#define PLATFORM_WIN32
#define PLATFORM_STRING "Windows"
#else
#define PLATFORM_UNIX
#define PLATFORM_STRING "Unix"
#endif
As you are using a 64 bit system, this apparently fails because only preprocessor symbols/defines/macros for 32 bit systems are checked. This should be fixed.
Could you please try the following command in your Cygwin shell?:
Code: Select all
$ touch foo.h; /path/to/cpp -dM foo.h | grep -i win
Please replace the "/path/to/cpp" with the actual path to "cpp" (the C preprocessor binary) on your system. You should probably be able to find it with "which cpp" (and could then simply use "cpp" instead of "/path/to/cpp").
This should give a list of all preprocessor definitions which include the string "win"; for example, on my cross-compiler setup, I get the following output:
Code: Select all
#define __WINNT 1
#define __WINNT__ 1
#define __WIN32__ 1
#define _WIN32 1
#define WIN32 1
#define __WINT_TYPE__ short unsigned int
#define __WIN32 1
#define WINNT 1
So maybe I only have to add "WIN64" and/or "_WIN64" to that line in "src/libgame/platform.h". You could also try just that and see if it helps!
(The name of the following R'n'D internal preprocessor definition of "PLATFORM_WIN32" could be left unchanged and should not hurt, although I should probably change this to "PLATFORM_WINDOWS" all over the R'n'D code maybe.)
Please let me know it this fixes the problem, and I will change it in my code base, too.