Cross compilation - hpgDesigns/hpgdesigns-dev.io GitHub Wiki
64-bit Ubuntu 12.04
32-bit Ubuntu 12.04
Direct cross-compilation does not work, but setting up a VM with 32-bit Ubuntu 12.04 works well.
Latest attempt:
Open a terminal and execute the following commands:
sudo aptitude update sudo aptitude safe-upgrade sudo aptitude install libc6-dev-i386 g++-multilib lib32z1-dev
Open LateralGM, open the game to cross-compile, and set the compiler flag in Enigma->Settings->API->Compiler to "GNU GCC G++ 32". Run the game.
When the compiler gives these complaints:
" ... /usr/bin/ld: cannot find -lX11 /usr/bin/ld: cannot find -lGL usr/bin/ld: cannot find -lGLU ... "
one possible solution is to install the :32 versions of the libraries. Aptitude complains a lot about installing them, and how they affect the system is unknown. Setting up a VM with 64-bit Ubuntu 12.04 and installing the 32:versions of the libraries there might be a better idea than just installing, but then you might as well set up a VM with 32-bit Ubuntu 12.04. Another option might be to use a chroot, see for instance this article:http://www.debian-administration.org/articles/426.
64-bit Windows 7
Direct cross-compilation does not work, but setting up a VM with 64-bit Windows 7 works well (assuming you have access to 64-bit Windows 7). This is in contrast to GameMaker, since GameMaker requires DirectX and therefore may cause trouble in a Windows 7 VM on Ubuntu.
Latest attempt:
Open a terminal and copy-paste-execute the following commands to install various parts related to MinGW and 64-bit:
sudo aptitude update sudo aptitude safe-upgrade sudo aptitude install mingw-w64 mingw-w64-dev binutils-mingw-w64-x86-64 g++-mingw-w64 g++-mingw-w64-i686 g++-mingw-w64-x86-64 gcc-mingw-w64 gcc-mingw-w64-base gcc-mingw-w64-i686 gcc-mingw-w64-x86-64
Open LateralGM, open the game to cross-compile, and set the compiler flag in Enigma->Settings->API->Compiler to "MinGW 64". Run the game.
The compiler should give these complaints at some point:
" ... ...fatal error: zlib.h: No such file or directory ... ...fatal error: ffi.h: No such file or directory ... "
The zlib issue may solve itself automatically given time, see this link: https://bugs.launchpad.net/ubuntu/+source/mingw-w64/+bug/1022397. The ffi issue is unknown, but should be solvable, probably through compiling ffi using MinGW compilers and then linking it by modifying the right file in the folder Compilers.