[How-To]Use Irrlicht with code::blocks and win32 dlls/libs
Posted: Mon Dec 04, 2006 9:37 pm
Ok, Here's how to use Code::Blocks with irrlicht win32 dll/lib.
The Main reason for using the win32 dll/lib is becouse (IMHO) it's much better then the GCC version.
Ok, let's start:
1. Downlaod CODE::BLOCKS
http://prdownloads.sourceforge.net/code ... e?download
There's a downlaod without the GCC compiler but i didn't use that one.
2. Downlaod visual studio 2003 toolkit
http://xona.com/programs/VCToolkitSetup ... 07.06).zip
Copy ALL above link and paste into browser. (Clicking on it won't work)
Finding this was hard. (Windows stoped all it's 2003 toolkit downlaods)
[Comment]
So, if someone could uplaod it to some other place so we know it will allways be there that would be great.
[/Comment]
3. Install Code::Blocks and 2003 toolkit. ( I Asume you know how to install software)
4. In the tutorial i'll assume you installed 2003 toolkit in (C:/Microsoft Visual C++ Toolkit 2003" and code::blocks in (C:/CodeBlocks) and Irrlicht in (C:/Irrlicht)
Now that you have all the needed software let's set up code::blocks.
5. Start code::blocks, in will show you a text box that it detected the compilers (Code::blocks auto detects the compilers), just press the "Ok" (can't remember the axact button text ).
6. Now lets just make sure that code::blocks detected the toolkit03 compiler.
6a. goto "Build->compiler options", you'll get a new window where you can change the compiler settings, under "Selected compiler" there's "GNU GCC Compiler" click on it and you'll get a few other compilers (you don't have all of them) and click "Microsoft visual c++ toolkit 2003"
6a. Now click on the "Programs" tab and then click the "auto detect" button. and a "auto detected installasion path of...". ok now the programs should be detected.
6b. Click the "directories" tab, under the "Compiler" you should have "C:\Microsoft Visual C++ Toolkit 2003\include" if not click the add button and add "C:\Microsoft Visual C++ Toolkit 2003\include" (Note i assume you installed MSVC++ TK 03 in "C:\Microsoft Visual C++ Toolkit 2003")
now click on the "linker" tab and check if "C:\Microsoft Visual C++ Toolkit 2003\lib" is in. if not add it.
Ok, now the compiler should be configured,
7. start a new project "File->New Project...", there's a "Irrlicht project" template click on it and under optians select "Free microsoft visual c++ toolkit 2003 project" (This is the compiler)
Ok, now click "Create", and save your projecy somewhere, after witch you'll get a message saing that code::blocks expects irrlicht to be in "C:/Irrlicht"(We'll change that)
8. Now go to "Project->Build Options", under "Irrlicht Project" click "default", now click the "Directory" "Compiler" and add the "C:/Irrlicht/include", now the "linkers" tab and add "C:\irrlicht\lib\Win32-visualstudio"
And after all that now click "Ok"
9. Copy the "Irrlicht.dll" into your project directory.
10. Now "Build->Build" (ctrl-F9), and "Build->Run".
If you did everything right irrlicht should start with no problem.
You can now save this template for later use.
"Project->Save project as user-template" and save this as a tempalte so you can later create it again and don't have to go threw this again.
Saved tempaltes and in "File->New project" "User Templates" tab.
That should be all. (if i didn't forget anything. )
Reason for using win32 dll/lib instead of GCC version:
1. DirectX is compiled into it and you don't need to recompile irrlicht with DX support.
2. Not sure but the win32 seem to run a few frames faster then GCC.
3. I'm sure there's more but those are enough reason for me.
Main reason i use win32 dll/lib is becouse on my laptop when i try to use GCC compiled irrlicht (with DX) it crashed when i try to use dx8/9 drivers.
So my guess it that win32 vesrion in more stable then GCC version in some cases, And i like knowing that even if some1 is tring to downlaod and play my game from a laptop it would work fine.
Other NOTE: Some irrlicht tutorials use "windows.h" witch you'll need the "Microsoft Platfork sdk"'s include and lib in order to use it. This isn't 100% needed in order to sue irrlicht.
But here's a link to it incase you want to use it. (You should know how to set it up if you did this tutorial)
Windows® Server 2003 SP1 Platform SDK Web Install
just install the minimum options. without tools and stuff. all you need is the "inlcude" and "libs" directories.
Last Note:
MSVC++ Toolkit 2003 doesn't include a debugger.
If anyone has a debuger that can be integrated into code::blocks that'll be great.
The Main reason for using the win32 dll/lib is becouse (IMHO) it's much better then the GCC version.
Ok, let's start:
1. Downlaod CODE::BLOCKS
http://prdownloads.sourceforge.net/code ... e?download
There's a downlaod without the GCC compiler but i didn't use that one.
2. Downlaod visual studio 2003 toolkit
http://xona.com/programs/VCToolkitSetup ... 07.06).zip
Copy ALL above link and paste into browser. (Clicking on it won't work)
Finding this was hard. (Windows stoped all it's 2003 toolkit downlaods)
[Comment]
So, if someone could uplaod it to some other place so we know it will allways be there that would be great.
[/Comment]
3. Install Code::Blocks and 2003 toolkit. ( I Asume you know how to install software)
4. In the tutorial i'll assume you installed 2003 toolkit in (C:/Microsoft Visual C++ Toolkit 2003" and code::blocks in (C:/CodeBlocks) and Irrlicht in (C:/Irrlicht)
Now that you have all the needed software let's set up code::blocks.
5. Start code::blocks, in will show you a text box that it detected the compilers (Code::blocks auto detects the compilers), just press the "Ok" (can't remember the axact button text ).
6. Now lets just make sure that code::blocks detected the toolkit03 compiler.
6a. goto "Build->compiler options", you'll get a new window where you can change the compiler settings, under "Selected compiler" there's "GNU GCC Compiler" click on it and you'll get a few other compilers (you don't have all of them) and click "Microsoft visual c++ toolkit 2003"
6a. Now click on the "Programs" tab and then click the "auto detect" button. and a "auto detected installasion path of...". ok now the programs should be detected.
6b. Click the "directories" tab, under the "Compiler" you should have "C:\Microsoft Visual C++ Toolkit 2003\include" if not click the add button and add "C:\Microsoft Visual C++ Toolkit 2003\include" (Note i assume you installed MSVC++ TK 03 in "C:\Microsoft Visual C++ Toolkit 2003")
now click on the "linker" tab and check if "C:\Microsoft Visual C++ Toolkit 2003\lib" is in. if not add it.
Ok, now the compiler should be configured,
7. start a new project "File->New Project...", there's a "Irrlicht project" template click on it and under optians select "Free microsoft visual c++ toolkit 2003 project" (This is the compiler)
Ok, now click "Create", and save your projecy somewhere, after witch you'll get a message saing that code::blocks expects irrlicht to be in "C:/Irrlicht"(We'll change that)
8. Now go to "Project->Build Options", under "Irrlicht Project" click "default", now click the "Directory" "Compiler" and add the "C:/Irrlicht/include", now the "linkers" tab and add "C:\irrlicht\lib\Win32-visualstudio"
And after all that now click "Ok"
9. Copy the "Irrlicht.dll" into your project directory.
10. Now "Build->Build" (ctrl-F9), and "Build->Run".
If you did everything right irrlicht should start with no problem.
You can now save this template for later use.
"Project->Save project as user-template" and save this as a tempalte so you can later create it again and don't have to go threw this again.
Saved tempaltes and in "File->New project" "User Templates" tab.
That should be all. (if i didn't forget anything. )
Reason for using win32 dll/lib instead of GCC version:
1. DirectX is compiled into it and you don't need to recompile irrlicht with DX support.
2. Not sure but the win32 seem to run a few frames faster then GCC.
3. I'm sure there's more but those are enough reason for me.
Main reason i use win32 dll/lib is becouse on my laptop when i try to use GCC compiled irrlicht (with DX) it crashed when i try to use dx8/9 drivers.
So my guess it that win32 vesrion in more stable then GCC version in some cases, And i like knowing that even if some1 is tring to downlaod and play my game from a laptop it would work fine.
Other NOTE: Some irrlicht tutorials use "windows.h" witch you'll need the "Microsoft Platfork sdk"'s include and lib in order to use it. This isn't 100% needed in order to sue irrlicht.
But here's a link to it incase you want to use it. (You should know how to set it up if you did this tutorial)
Windows® Server 2003 SP1 Platform SDK Web Install
just install the minimum options. without tools and stuff. all you need is the "inlcude" and "libs" directories.
Last Note:
MSVC++ Toolkit 2003 doesn't include a debugger.
If anyone has a debuger that can be integrated into code::blocks that'll be great.