compiling dll with codeblocks+MSVCtoolkit in 10 screenshots!
compiling dll with codeblocks+MSVCtoolkit in 10 screenshots!
Ok guys, It's sad to say this but Codeblocks moved the throne of my beloved "Relo" ide. Codeblocks is much easier to work with and allows the inclussion of lib folders (whereas Relo doesn't). The latest version allows importing MSVC projects as well as Visual studio projects, making it the ideal IDE to work with Irrlicht, and to top things off, it works with GNU, Borland, Digital Mars and MSVC toolit 2003 free compilers (it autodetects them on your system).
I've always tried to promote MSVC toolkit in the community since it's the pro compiler made available for free; but you might as well get codeblocks to work with other compilers! I'm sure Cmoibenlepro will like this one !
Things you'll need:
latest version of codeblocks:
http://www.codeblocks.org/
MSVC toolkit:
http://www.microsoft.com/downloads/deta ... laylang=en
MS plattform SDK: use the 2003 version; the 2005 gives problems, link here:
http://www.microsoft.com/msdownload/pla ... k-full.htm
Or grab this file with the "Include" and "lib" folders only:
http://www.danielpatton.com/afecelis/fi ... oftSDK.zip
MS DX sdk: huge download. Try to get just the "Include" and "Lib" folders. They're all you need.
edited: grab the zipped version I got here:
http://www.danielpatton.com/afecelis/files/DXSDK.zip
It's an old 2004 version so it still has the dx8 stuff that latest sdks report errors on.
ok, now on to the screenshots:
01. Launch codeblocks, go to project, import, ms visual c++ project:
http://www.danielpatton.com/afecelis/co ... oard01.jpg
02. Look for the dsp project in Irrlicht's "source" folder; remember to uncompress the zip with the source! once you find it, select it and hit open. It will ask which compiler you want to use (I used MSVC toolkit 2003) and if you want to build in debug or release mode; make your pick! Wait a bit while it loads all of Irrlicht's files!
http://www.danielpatton.com/afecelis/co ... oard02.jpg
03. Select your imported project (Irrlicht), right click on it and go to "build options"
http://www.danielpatton.com/afecelis/co ... oard03.jpg
04. Select "Irrlicht -Win32release" (in my case I chose to build the dll in release mode), verify on the right you're using the proper compiler (in my case the MSVC toolkit 2003), and on the first palette (compiler options) verify everything is set up as in my screenshot:
http://www.danielpatton.com/afecelis/co ... oard04.jpg
EDITED: new codeblocks versions will have the options in 3 separate palettes.
05. Select the second palette (linker options) and add in the libraries that show up in my screenshot; one by one:
http://www.danielpatton.com/afecelis/co ... oard05.jpg
EDITED-IMPORTANT-libci.lib error
exclude libci.lib in the "other linker options" menu.
http://www.danielpatton.com/afecelis/co ... _error.jpg
06. go on to the third palette (directories), in the compiler options, add the necesary include folders, in the same order as in my screenshot:note: it will ask if you want to keep the folder as relative path, answer "no" to this option to make the path absolute:
NOTE: SINCE IRRLICHT 0.10 YOU MUST ALSO INCLUDE THE ZLIB FOLDER
http://www.danielpatton.com/afecelis/co ... oard06.jpg
07. Do the same in the linker palette, add the necesary lib folders, as in my screenshot (again, answer "no" to relative paths); once done, hit close, go to file and save your project as "irrlicht" in the source folder:
NOTE: SINCE IRRLICHT 0.10 YOU MUST CHECK THE NEW NAME OF THE VISUALSTUDIO LIB FOLDER
http://www.danielpatton.com/afecelis/co ... oard07.jpg
08. Right click on your "Irrlicht" project and select "compile", you may also use the sortcut ctrl-f9 or hit the 12th icon from left to right, the one that looks like a dented wheel.
http://www.danielpatton.com/afecelis/co ... oard08.jpg
09. Rejoice! 0 errors, 0 warnings. Go to your release folder and pick up your dll.
http://www.danielpatton.com/afecelis/co ... oard09.jpg
10. the dll, ready to be used:
http://www.danielpatton.com/afecelis/co ... oard10.jpg
easy huh? Benoit, be happy!
to make things even cooler, Cmoibenlepro made a template for Irrlicht projects, grab it here, and unzip it into your "templates" folder in your codeblocks installation:
http://www.danielpatton.com/afecelis/co ... plates.zip
so now it's even easier; all in one, an optimized dll and the chance to make projects!!!!
now I must uninstall my good ol' Relo, who fought all those coding battles, arm by arm, next to me, in the solitude of the night..blah blah blah...blah blah
ENJOY, IRRLICHTERS!
I've always tried to promote MSVC toolkit in the community since it's the pro compiler made available for free; but you might as well get codeblocks to work with other compilers! I'm sure Cmoibenlepro will like this one !
Things you'll need:
latest version of codeblocks:
http://www.codeblocks.org/
MSVC toolkit:
http://www.microsoft.com/downloads/deta ... laylang=en
MS plattform SDK: use the 2003 version; the 2005 gives problems, link here:
http://www.microsoft.com/msdownload/pla ... k-full.htm
Or grab this file with the "Include" and "lib" folders only:
http://www.danielpatton.com/afecelis/fi ... oftSDK.zip
MS DX sdk: huge download. Try to get just the "Include" and "Lib" folders. They're all you need.
edited: grab the zipped version I got here:
http://www.danielpatton.com/afecelis/files/DXSDK.zip
It's an old 2004 version so it still has the dx8 stuff that latest sdks report errors on.
ok, now on to the screenshots:
01. Launch codeblocks, go to project, import, ms visual c++ project:
http://www.danielpatton.com/afecelis/co ... oard01.jpg
02. Look for the dsp project in Irrlicht's "source" folder; remember to uncompress the zip with the source! once you find it, select it and hit open. It will ask which compiler you want to use (I used MSVC toolkit 2003) and if you want to build in debug or release mode; make your pick! Wait a bit while it loads all of Irrlicht's files!
http://www.danielpatton.com/afecelis/co ... oard02.jpg
03. Select your imported project (Irrlicht), right click on it and go to "build options"
http://www.danielpatton.com/afecelis/co ... oard03.jpg
04. Select "Irrlicht -Win32release" (in my case I chose to build the dll in release mode), verify on the right you're using the proper compiler (in my case the MSVC toolkit 2003), and on the first palette (compiler options) verify everything is set up as in my screenshot:
http://www.danielpatton.com/afecelis/co ... oard04.jpg
EDITED: new codeblocks versions will have the options in 3 separate palettes.
05. Select the second palette (linker options) and add in the libraries that show up in my screenshot; one by one:
http://www.danielpatton.com/afecelis/co ... oard05.jpg
EDITED-IMPORTANT-libci.lib error
exclude libci.lib in the "other linker options" menu.
http://www.danielpatton.com/afecelis/co ... _error.jpg
06. go on to the third palette (directories), in the compiler options, add the necesary include folders, in the same order as in my screenshot:note: it will ask if you want to keep the folder as relative path, answer "no" to this option to make the path absolute:
NOTE: SINCE IRRLICHT 0.10 YOU MUST ALSO INCLUDE THE ZLIB FOLDER
http://www.danielpatton.com/afecelis/co ... oard06.jpg
07. Do the same in the linker palette, add the necesary lib folders, as in my screenshot (again, answer "no" to relative paths); once done, hit close, go to file and save your project as "irrlicht" in the source folder:
NOTE: SINCE IRRLICHT 0.10 YOU MUST CHECK THE NEW NAME OF THE VISUALSTUDIO LIB FOLDER
http://www.danielpatton.com/afecelis/co ... oard07.jpg
08. Right click on your "Irrlicht" project and select "compile", you may also use the sortcut ctrl-f9 or hit the 12th icon from left to right, the one that looks like a dented wheel.
http://www.danielpatton.com/afecelis/co ... oard08.jpg
09. Rejoice! 0 errors, 0 warnings. Go to your release folder and pick up your dll.
http://www.danielpatton.com/afecelis/co ... oard09.jpg
10. the dll, ready to be used:
http://www.danielpatton.com/afecelis/co ... oard10.jpg
easy huh? Benoit, be happy!
to make things even cooler, Cmoibenlepro made a template for Irrlicht projects, grab it here, and unzip it into your "templates" folder in your codeblocks installation:
http://www.danielpatton.com/afecelis/co ... plates.zip
so now it's even easier; all in one, an optimized dll and the chance to make projects!!!!
now I must uninstall my good ol' Relo, who fought all those coding battles, arm by arm, next to me, in the solitude of the night..blah blah blah...blah blah
ENJOY, IRRLICHTERS!
Last edited by afecelis on Sat Aug 27, 2005 2:32 pm, edited 12 times in total.
BTW:
I'm deleting the Relo c++ video tutorials from my site since they are already outdated and Codeblocks seems to make things easier (besides the webspace they're eating!!).
Only the Gmax VT's will remain there but I think they're bound to disappear as well since new and better level editing techniques are around. I'm planning to write some tutorials on the use of the "my3d" format and Giles.
regards,
Alvaro F. Celis
"afecelis"
I'm deleting the Relo c++ video tutorials from my site since they are already outdated and Codeblocks seems to make things easier (besides the webspace they're eating!!).
Only the Gmax VT's will remain there but I think they're bound to disappear as well since new and better level editing techniques are around. I'm planning to write some tutorials on the use of the "my3d" format and Giles.
regards,
Alvaro F. Celis
"afecelis"
-
- Posts: 237
- Joined: Thu May 27, 2004 3:18 pm
- Location: Canada
I agreeI'm sure Cmoibenlepro will like this one !
Nice job Alvaro
BTW, I didn't had the time to test it with the least version of codeblocks... does it still works?to make things even cooler, Cmoibenlepro made a template for Irrlicht projects, grab it here, and unzip it into your "templates" folder in your codeblocks installation:
http://www.danielpatton.com/afecelis/co ... plates.zip
We will remember it forever...now I must uninstall my good ol' Relo, who fought all those coding battles, arm by arm, next to me, in the solitude of the night..blah blah blah...blah blah
LOOOOOOOOOOOL
that was a good one!
and yup, your template works like a charm! Although I think the Irrlicht.cpb file needs the lib path corrected to : Add directory="C:\Irrlicht\lib\VisualStudio";
I'm glad you found it useful!
edited: the version available for download of your template has got the path corrected
that was a good one!
and yup, your template works like a charm! Although I think the Irrlicht.cpb file needs the lib path corrected to : Add directory="C:\Irrlicht\lib\VisualStudio";
I'm glad you found it useful!
edited: the version available for download of your template has got the path corrected
I've been trying to get this to work for a week now, so I was quite happy to see you made this tutorial. Although it would seem I was doing everything fine already.
Only difference is I'm using the MS Platform SDK not the MS Developer SDK, I've searched with google and on the MS site but can't find a MS Developer SDK, could someone be so kind as to point me in the right direction?
And if anyones interested these are the 5 errors I get:
Chris.
Only difference is I'm using the MS Platform SDK not the MS Developer SDK, I've searched with google and on the MS site but can't find a MS Developer SDK, could someone be so kind as to point me in the right direction?
And if anyones interested these are the 5 errors I get:
Code: Select all
C:\Program Files\Microsoft Platform SDK\Include\WinNT.h(222) : error C2146: syntax error : missing ';' before identifier 'PVOID64'
C:\Program Files\Microsoft Platform SDK\Include\WinNT.h(222) : error C2501: 'PVOID64' : missing storage-class or type specifiers
C:\Program Files\Microsoft Platform SDK\Include\WinNT.h(5940) : error C2146: syntax error : missing ';' before identifier 'Buffer'
C:\Program Files\Microsoft Platform SDK\Include\WinNT.h(5940) : error C2501: '_FILE_SEGMENT_ELEMENT::PVOID64' : missing storage-class or type specifiers
C:\Program Files\Microsoft Platform SDK\Include\WinNT.h(5940) : error C2501: '_FILE_SEGMENT_ELEMENT::Buffer' : missing storage-class or type specifiers
dunno if it's the same. The one I got is the "Microsoft platform SDK update 2003". Now that I check for it, this is the one that comes up:
http://www.microsoft.com/downloads/deta ... n#filelist
http://www.microsoft.com/downloads/deta ... n#filelist
@Chris: the link I posted above is the 2005 version. The one I'm using is this one:
http://www.microsoft.com/msdownload/pla ... k-full.htm
from Feb. 2003. Follow the instructions, unzip everything accordingly and you'll have an autorun cd from which you can pick which elements to install. Haven't tried the 2005 version since my OS is still Win2k (although it says it's supported), but since things are compiling ok,I'd rather not experiment and end screwing things up
@Cmoibenlepro and others: did you or anyone else suceed on compiling the dll?
http://www.microsoft.com/msdownload/pla ... k-full.htm
from Feb. 2003. Follow the instructions, unzip everything accordingly and you'll have an autorun cd from which you can pick which elements to install. Haven't tried the 2005 version since my OS is still Win2k (although it says it's supported), but since things are compiling ok,I'd rather not experiment and end screwing things up
@Cmoibenlepro and others: did you or anyone else suceed on compiling the dll?
Sorry Afecelis but I'm a 17 year old Male, and I'm just playing with you . Although I am very greatful for your help.
Yes the dll compiled, slightly smaller than teh one to come with Irrlicht0.9 but I've checked it and it runs like a charm.
I eventually got it to work using the 2003 SDK you pointed me to, not sure why the 2005 version didn't work. I'm using XP professional with sp2 if that have any meaning to it.
Now I really should do some maths revision for my exam tomorrow, but I want to code .
Yes the dll compiled, slightly smaller than teh one to come with Irrlicht0.9 but I've checked it and it runs like a charm.
I eventually got it to work using the 2003 SDK you pointed me to, not sure why the 2005 version didn't work. I'm using XP professional with sp2 if that have any meaning to it.
Now I really should do some maths revision for my exam tomorrow, but I want to code .
LoooooooooooooooL!
you guys got such ideas!
Chris, I'm glad it compiled ok. So then it's the 2003 version and not the 2005. Interesting; I'm editing the tutorial with the proper link. I downloaded the 2005 version yesterday...good thing I didn't rush into installing it
And yup, your dll will be smaller because the compiler that comes with the toolkit is the pro version (not the standard) and cause it's optimized for speed and size. Pretty cool ide, huh?
you guys got such ideas!
Chris, I'm glad it compiled ok. So then it's the 2003 version and not the 2005. Interesting; I'm editing the tutorial with the proper link. I downloaded the 2005 version yesterday...good thing I didn't rush into installing it
And yup, your dll will be smaller because the compiler that comes with the toolkit is the pro version (not the standard) and cause it's optimized for speed and size. Pretty cool ide, huh?