GCC 64bit compilation on Windows

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
tobix10
Posts: 15
Joined: Thu Feb 26, 2015 5:34 pm

GCC 64bit compilation on Windows

Post by tobix10 »

I need to check that my project from Linux will run on Windows. Code and external libraries are multiplatform, but libraries are 64 bits and I also need to compile project with 64bit compiler.
Firstly, I've tried VisualStudio 2013 and got compiled and linked app, but on start there is error: 'the application was unable to start correctly'. I tried to reinstall visual studio redistributables and used dependency walker to check dlls, but it didn't help.

Next try was to use gcc, but it seems that one provided with Irrlicht 1.8.1 build (Win32 gcc) is not working (undefined IdentitytyMaterial).
I have Msys and Mingw64 installed, but I have problem with irrlicht compilation. Another strange error that occurs at random moments: 'make.exe is not recognized'.

I have a request if someone can share me 64bit gcc Irrlicht 1.8.1 build for windows (static or shared lib). I will be very grateful.
SLC
Posts: 21
Joined: Mon Jan 06, 2014 9:41 pm

Re: GCC 64bit compilation on Windows

Post by SLC »

Assuming you have the latest MinGW -w64 version installed on your computer (not the TDM GCC one. that's just asking for trouble). Download Code::Blocks and install it as well. Download the version without the compiler (codeblocks-##.##-setup.exe)

Get your Irrlicht source. Either from repository or the stable release. And go to where the Irrlicht source is located ([IRRLICHT_DIR]/source/Irrlicht). In there you should find a Code::Blocks project file named "Irrlicht-gcc.cbp". Open that and compile any of the available targets:
  • Win32 - Debug - dll
  • Win32 - Release - accurate math - dll
  • Win32 - Release - fast math - dll
  • Win32 - Debug - static
  • Win32 - Release - accurate math - static
  • Win32 - Release - fast math - static
  • ...
You should find your library in "[IRRLICHT_DIR]/lib/Win32-gcc" and DLL in "[IRRLICHT_DIR]/bin/Win32-gcc". Either add them to your include/system paths or copy them to your project path.

To compile the examples as well. You can load the Code::Blocks workspace from "[IRRLICHT_DIR]/examples/BuildAllExamples.workspace" and choose build workspace. You should find the executable files in the same directory as the DLL.

Usually that worked for me any time I needed to test something in Irrlicht.

NOTE:

If Code::Blocks doesn't find your MinGW-w64 installation automatically. Open Code::Blocks and go to Settings > Compiler and set your compiler paths manually in there.

One more thing you could do is to go to your MinGW installation path and inside the "bin" folder make sure there's both "make.exe" and "mingw32-make.exe". If only one of them exist then make a copy of the other and rename it. To prevent any make errors.

Another thing I usually do is to use Git instead of MY-SYS. That usually works for most of my needs.

Image
Post Reply