Compiling Irrlicht with GCC 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
Jedimace1
Posts: 16
Joined: Fri Aug 01, 2008 12:59 pm

Compiling Irrlicht with GCC on Windows

Post by Jedimace1 »

Hello. I am trying to compile Irrlicht with GCC on Windows with DX9, and I am using the latest Code::Blocks. I downloaded the latest Irrlicht on the SVN(actually yesterday), and downloaded DirectX 9 and the Platform SDK. I opened the Code::Blocks project for Windows on GCC and linked MinGW, the Platform SDK and DX9 into it. I then went to IrrCompileConfig.h and added this line:

Code: Select all

#define _IRR_COMPILE_WITH_DIRECT3D_9_
Then I just compiled it. It ran through all the compilation fine until the end with the object file. I got these errors: http://irrlichtirc.g0dsoft.com/paste/186
Image
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

Those are in d3dx9.lib, rather than d3d9.lib.

d3d9x.lib is linked in using #pragma comment (lib, "d3dx9.lib"), but that's a MSVC pragma. With GCC, you'll have to link manually against both d3d9.lib and d3dx9.lib.

Good error report, by the way.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Jedimace1
Posts: 16
Joined: Fri Aug 01, 2008 12:59 pm

Post by Jedimace1 »

Ok, I will try that. Thanks.
Image
Jedimace1
Posts: 16
Joined: Fri Aug 01, 2008 12:59 pm

Post by Jedimace1 »

I got it to work. I did what you said. But there is something you must know if you guys plan to do DX9 in GCC. YOU MUST USE MINGW LIBS. Link to MinGW folder, and in the lib there are all of the libraries in .a format you need. Also, all of the libraries have a prefix of lib. For example, I had to link libd3dx9.a. Also, you will need to copy the include from DX9 into the MinGW folder. The last thing is, with every Irrlicht application, you must have the Direct3D dll. I might make a seperate post explaining how to do GCC with DX9/Code::Blocks later.
Image
Post Reply