To use the 3D engine Irrlicht with Code:: Blocks has to download two programs from the Internet.
I used Code:: Blocks version 10.05 and Irrlicht version 1.7.2 on a Windows XP operating system.
You must install Code:: Blocks and then unzip the archive into a folder Irrlicht.
Select from Code:: Blocks File -> New -> Project … and then choose Irrlicht project as shown below:
A window will appear and you will need to enter the project name and where it is.
The following image shows the way of linking engine with Code:: Blocks.
Set the environment variable Irrlicht.
Then choose the folder where your 3D engine is.
Press right click on project and choose Build.
If this error occurs:
||=== irr001, Debug ===|
D:\working\irr001\main.cpp||In function 'int main(int, char**)':|
D:\working\irr001\main.cpp|69|error: invalid initialization of reference of type 'const irr::core::dimension2d&' from expression of type 'irr::core::dimension2d'|
C:\irrlicht-1.7.2\include\irrlicht.h|321|error: in passing argument 2 of 'irr::IrrlichtDevice* irr::createDevice(irr::video::E_DRIVER_TYPE, const irr::core::dimension2d&, irr::u32, bool, bool, bool, irr::IEventReceiver*)'|
||=== Build finished: 2 errors, 0 warnings ===|
Then createDevice needs a dimension2d<u32> not dimension2d<s32> for the window size.
Change as shown below:
If no error occurs, you’ll see how it runs as shown below:
This is simple example about Irrlicht. That is all for today.