I need a tutorial to compile Irrlicht + CodeBlocks + DirectX
I need a tutorial to compile Irrlicht + CodeBlocks + DirectX
Hello
I´m a neewbie programmer C++ and I´m using codeblocks. I need a detailed tutorial to compile Irrlicht with CodeBlocks and with support to DirectX 9.
Can any help me? Thanks.
I´m a neewbie programmer C++ and I´m using codeblocks. I need a detailed tutorial to compile Irrlicht with CodeBlocks and with support to DirectX 9.
Can any help me? Thanks.
-
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
Hmm... OK, let's see (I'm typing as I try this):
I'm assuming that you're using Irrlicht 1.4.2.
Open source\Irrlicht\Irrlicht_Win32-gcc.cbp in Code::Blocks.
Right click on Irrlicht, and select Build Options.
Select the Compiler settings tab, and the #defines sub-tab. Add:
_IRR_COMPILE_WITH_DIRECT3D_9_
__GNUWIN32__
(I'm not sure why __GNUWIN32__ was missing; I think we just didn't maintain the C::B projects very well).)
Select the Search directories tab.
Select the Compiler sub tab. Hit Add and add the path to your DXSDK include directory. For example, I added this:
C:\Program Files\Microsoft DirectX SDK (June 2006)\Include
Close down the Build Options dialog.
In the Build target dropdown in the build bar, select "Debug" (rather than "All"),
Right click on the Irrlicht project, and select "Rebuild".
That should get you a bin/Win32-gcc/libIrrlicht.a bin/Win32-gcc/Irrlicht.dll with D3D9 support.
Unfortunately, libIrrlicht.a is built the wrong place, so move or copy it from /bin/Win32-gcc to /lib/Win-gcc
After doing that, I can build and run the example .cbp projects and use the D3D9 device.
Curiously, I didn't have to link Irrlicht against d3d9.lib, which I find somewhat worrying, but it does seem to work.
I'm assuming that you're using Irrlicht 1.4.2.
Open source\Irrlicht\Irrlicht_Win32-gcc.cbp in Code::Blocks.
Right click on Irrlicht, and select Build Options.
Select the Compiler settings tab, and the #defines sub-tab. Add:
_IRR_COMPILE_WITH_DIRECT3D_9_
__GNUWIN32__
(I'm not sure why __GNUWIN32__ was missing; I think we just didn't maintain the C::B projects very well).)
Select the Search directories tab.
Select the Compiler sub tab. Hit Add and add the path to your DXSDK include directory. For example, I added this:
C:\Program Files\Microsoft DirectX SDK (June 2006)\Include
Close down the Build Options dialog.
In the Build target dropdown in the build bar, select "Debug" (rather than "All"),
Right click on the Irrlicht project, and select "Rebuild".
That should get you a bin/Win32-gcc/libIrrlicht.a bin/Win32-gcc/Irrlicht.dll with D3D9 support.
Unfortunately, libIrrlicht.a is built the wrong place, so move or copy it from /bin/Win32-gcc to /lib/Win-gcc
After doing that, I can build and run the example .cbp projects and use the D3D9 device.
Curiously, I didn't have to link Irrlicht against d3d9.lib, which I find somewhat worrying, but it does seem to work.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
-
- Posts: 101
- Joined: Wed Dec 03, 2008 5:33 pm
- Location: ger
-
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
Or one of those lazy dev slackers could add it by default to the Win32 C::B targets, since if you're building on and for Windows, you're likely to have a DXSDK.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Are you compiling with debug symbols turned on? This is often the cause of a huge dll or executable
-wyrmmage
-wyrmmage
Worlds at War (Current Project) - http://www.awkward-games.com
Ganadu'r, The Eternal Sage (Other Current Project) - http://rpg.naget.com
Ganadu'r, The Eternal Sage (Other Current Project) - http://rpg.naget.com
DirectX using gcc with Code Blocks
I am trying to get DirectX support in the Irrlicht.dll so I installed DirectX 9c SDK and when I compile there are no errors but a window pops up with the message "You must select a host application to "run" a library..."
I am not sure it successfully compiled...
UPDATE: Thanks to Switchcase I know understand that this happens when you build and run... just building remedies the problem.
I am not sure it successfully compiled...
UPDATE: Thanks to Switchcase I know understand that this happens when you build and run... just building remedies the problem.
Last edited by magfuse on Tue Dec 23, 2008 11:38 am, edited 1 time in total.
Building the irrlicht dll with directX 9 support in Irr 1.5
Is there an update for this tutorial using irrlicht 1.5? I compiled w/ no errors but I am not getting a Irrlicht.dll with direct x support. I tried debug, accurate, and fast targets w/ no luck.rogerborg wrote:Hmm... OK, let's see (I'm typing as I try this):
I'm assuming that you're using Irrlicht 1.4.2.
Open source\Irrlicht\Irrlicht_Win32-gcc.cbp in Code::Blocks.
Right click on Irrlicht, and select Build Options.
Select the Compiler settings tab, and the #defines sub-tab. Add:
_IRR_COMPILE_WITH_DIRECT3D_9_
__GNUWIN32__
(I'm not sure why __GNUWIN32__ was missing; I think we just didn't maintain the C::B projects very well).)
Select the Search directories tab.
Select the Compiler sub tab. Hit Add and add the path to your DXSDK include directory. For example, I added this:
C:\Program Files\Microsoft DirectX SDK (June 2006)\Include
Close down the Build Options dialog.
In the Build target dropdown in the build bar, select "Debug" (rather than "All"),
Right click on the Irrlicht project, and select "Rebuild".
That should get you a bin/Win32-gcc/libIrrlicht.a bin/Win32-gcc/Irrlicht.dll with D3D9 support.
Unfortunately, libIrrlicht.a is built the wrong place, so move or copy it from /bin/Win32-gcc to /lib/Win-gcc
After doing that, I can build and run the example .cbp projects and use the D3D9 device.
Curiously, I didn't have to link Irrlicht against d3d9.lib, which I find somewhat worrying, but it does seem to work.
I get warnings when building the examples that pragma statements are being ignored but there are no warnings when I build the irrlicht.dll
The precompiled dlls that come with 1.5 under bin\gcc or bin\win32-gcc do not have directx either. =/ But, the IrrDX 1.5 precompiled dll works fine for me. I want to be able to compile my own dll since I downloaded the DirectX SDK.
Re: Building the irrlicht dll with directX 9 support in Irr
Hey magfuse,
I just added a build tool for irrlicht to sf.net. It can build irrlicht 1.5 and the latest svn using Code::Blcoks + MingW GCC + Direct3D9, for both static (.a) and shared library (.dll) without any problem. You can download it at
irrBuild @ sf.net
, and check the announcement at
irrlicht forum announcement
In my mind, the only thing you should change is, tell the script your Direct3D SDK's path, that's all. And feel free to try other settings for your application/project.
HTH,
Jiang
magfuse wrote: Is there an update for this tutorial using irrlicht 1.5? I compiled w/ no errors but I am not getting a Irrlicht.dll with direct x support. I tried debug, accurate, and fast targets w/ no luck.
I get warnings when building the examples that pragma statements are being ignored but there are no warnings when I build the irrlicht.dll
The precompiled dlls that come with 1.5 under bin\gcc or bin\win32-gcc do not have directx either. =/ But, the IrrDX 1.5 precompiled dll works fine for me. I want to be able to compile my own dll since I downloaded the DirectX SDK.
I just added a build tool for irrlicht to sf.net. It can build irrlicht 1.5 and the latest svn using Code::Blcoks + MingW GCC + Direct3D9, for both static (.a) and shared library (.dll) without any problem. You can download it at
irrBuild @ sf.net
, and check the announcement at
irrlicht forum announcement
In my mind, the only thing you should change is, tell the script your Direct3D SDK's path, that's all. And feel free to try other settings for your application/project.
HTH,
Jiang
you also can try my IrrExtensions !!!
it was created for C::B and can compile the engine out of the box with C::B, but it also can be used for DevCpp and MSVC++...
it's mainly the same thing like Jiang's build tool, but you also can enable/disable many features of the engine and add some usefull extensions, if you like to...
it was created for C::B and can compile the engine out of the box with C::B, but it also can be used for DevCpp and MSVC++...
it's mainly the same thing like Jiang's build tool, but you also can enable/disable many features of the engine and add some usefull extensions, if you like to...
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Update: I managed to get the irrlicht.dll to compile with Code Blocks... I had many problems that might be good to list in case any one runs into the same problems..
Okay first was that I was using the using the Irrlicht.dll that was in the bin\Win32-gcc folder but I was updating the binary in the bin\gcc folder. linking issue causing me to use the wrong dll in my projects.
Second I placed at the top of IrrCompileConfig.h to make sure this was defined
Then I noticed that i still was building using IrrCompileConfig.h because no pragma message was displayed. Apparently the IDE thought everything was up to date and didn't build files that included IrrCompileConfig.h So I had to CLEAN WORKSPACE and it works!!
Except for one thing... high level shaders... im sure its a define somewhere. Or maybe my laptop gfx card doesn't support this??
Thanks for your help!
Okay first was that I was using the using the Irrlicht.dll that was in the bin\Win32-gcc folder but I was updating the binary in the bin\gcc folder. linking issue causing me to use the wrong dll in my projects.
Second I placed
Code: Select all
#ifndef _IRR_COMPILE_WITH_DIRECT3D_9_
#define _IRR_COMPILE_WITH_DIRECT3D_9_
#pragma message("Compiling Irrlicht with support for DX9 is now enabled.")
#endif // _IRR_COMPILE_WITH_DIRECT3D_9_
Then I noticed that i still was building using IrrCompileConfig.h because no pragma message was displayed. Apparently the IDE thought everything was up to date and didn't build files that included IrrCompileConfig.h So I had to CLEAN WORKSPACE and it works!!
Except for one thing... high level shaders... im sure its a define somewhere. Or maybe my laptop gfx card doesn't support this??
Thanks for your help!