New codeblocks+msvc toolkit tutorial pdf version,0.12 tested

A forum to store posts deemed exceptionally wise and useful
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

New codeblocks+msvc toolkit tutorial pdf version,0.12 tested

Post by afecelis »

Revised tutorial of the previous "compiling the dll in 10 screenshots"; 0.12 compatible and in a compact pdf file.

http://www.danielpatton.com/afecelis/dll_tutorial.pdf

hope it solves many of the doubts not covered in the previous version.
:D
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

edited:

just uploaded a newer version with a link to a zipped folder with MS SDK's libraries so that you don't have to DL 300 mb but a single 44 mb file.

link here:
http://www.danielpatton.com/afecelis/fi ... oftSDK.zip
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

Updated:
Just added a second part showing how to use the Irrlicht project template to create and compile apps.

same download link.

Ideal for newbies :wink:
mandrav
Posts: 117
Joined: Sat Aug 27, 2005 8:29 pm
Contact:

Post by mandrav »

Nice work there afecelis :)
I got a couple of tips for codeblocks.

Tip 1:
Make use of environment variables in codeblocks.
You could create an environment variable in codeblocks pointing to the Irrlicht top-level folder e.g. IRRBASE=C:\IrrSDK.
Then you can use this almost anywhere in codeblocks. Like in the compiler/linker search dirs.
For example, instead of adding the C:\IrrSDK\include dir you could add $(IRRBASE)\include.
If, for some reason, you change Irrlicht's location on your hard disk, updating your project for it is as simple as changing *only* the environment variable in codeblocks :)

Environment variables in codeblocks can be typed in any way you like:

$IRRBASE
$(IRRBASE)
${IRRBASE}
%IRRBASE%

The good thing is that environment variables can be set in codeblocks a) globally, b) per-project or c) per-target (overriding each other in the opposite order).

Tip 2:
You can run your executable from within codeblocks without copying the Irrlicht DLL (or any other file) in your project's folder.
Just set the build target's working directory to where the irrlicht.dll is located :)

HTH,
Yiannis.
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

Great tips Mandrav!

Didn't know of setting up env vbles in codeblocks directly. As a matter of fact, I just uploaded a new version of the tutorial and added a step in which the "include" and "lib" folders are added as system variables. Perhaps some ppl were having problems when adding the system libraries for the dll to compile.

about tip2: didn't know of that one either! Great idea, but remember I tried to make the tut as user-friendly as possible, and also thinking in the posibility of redestributing the project.

many thanks for your ideas and suggestions Mandrav! I'm glad you found it useful.
mandrav
Posts: 117
Joined: Sat Aug 27, 2005 8:29 pm
Contact:

Post by mandrav »

afecelis wrote: about tip2: didn't know of that one either! Great idea, but remember I tried to make the tut as user-friendly as possible, and also thinking in the posibility of redestributing the project.
The "working directory" can be set in the template so when a new Irrlicht project was created it would need zero configuration from the user ;)
That's the reason I 'm advocating the usage of env. vars.
afecelis wrote: many thanks for your ideas and suggestions Mandrav! I'm glad you found it useful.
Well, I 'm thanking you because the more projects find codeblocks usefull, the more satisfaction I get (I 'm its author, in case you didn't know).

Also, if you want an Irrlicht template to be officially included in the next release, just submit it to the project's patch tracker :)

Yiannis.
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

Whoa! THE MAN HIMSELF!
hehehehe :wink:

now I'm flattered! Yup, I'm promoting the use of Codeblocks in this community since I found it to be a very powerful tool in combination with the toolkit compiler. I had already written a previous version but left some things out so I decided to update it with the latest files and engine.

Before codeblocks, I wrote some tutorials on how to compile the dll using Relo as IDE, but it was a pain since you had to trick the program in order to find things (it didn't allow the use of lib folders). Working together with Cmoibenlepro, a project template was written for Relo and then I released a series of video tutorials on how to use Relo with the Irrlicht engine.

But then we found codeblocks!!!! hehehehehhe, and it made our lives much simpler (and guess who could erase the video from his ftp?). Now things are pretty straightforward. Thanks for your work Yiannis. I had no idea you dropped by the Irrlicht community.

and Finally, yup! We'd love to have a project template for Irrlicht (like the one you got for Ogre already); I was about to send you the template files to see if it would be possible to do such thing. The only thing is that Irrlicht users uncompress the files and source in different ways (myself included) so a note saying that the template needs its paths checked would be required.

many thanks again!

:D
mandrav
Posts: 117
Joined: Sat Aug 27, 2005 8:29 pm
Contact:

Post by mandrav »

Just an update:
An Irrlicht Project template has been added in codeblocks-CVS :)
  • Improved template so that you can choose between gcc/vctk2003 compilers on project creation.
  • Removed the MSVC-specific instructions at the top of main.cpp ;)
  • With the CVS version, a notice window appears, when a new Irrlicht Project is created, to alert the user about the Irrlicht's SDK location ;)
  • No need to copy the Irrlicht DLL and media to your project's folder (or the other way around). The executable is generated in your project's folder and, when ran, it is ran in Irrlicht's SDK lib directory (side-by-side with Irrlicht.dll) :)
Yiannis.
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

Sweeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeet! :D :D :D

so it will be part of next "official" release as well?

thnx for everything Yiannis! :D
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

I love a good wedding. *wipes tear from eye* sniff...
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

yup, I couldn't help it, twas love at first sight! :wink:
Nova
Competition winner
Posts: 99
Joined: Mon May 09, 2005 10:32 am

Post by Nova »

Hey,

I have several questions about those env vars.
Does the codeblocks vars replace those system vars you proposed to set?!
And where can I set the Vars in codeblocks? I found the tab "Custom Variables" in the Compiler options but I am not quite sure if that is the right thing.

Additionally I have a little problem with your tutorial afecelis.
I did everything you told me to and even cross checked it, but I always get the following Linker Error:

fatal error: LNK1181: cannot open input file '..\Release\C3DSMeshFileLoader.obj'

I tried to copy this file into the directories but it never worked.
I assume I misspelled something but I don't know which setting goes along with this error.


Anyways, thanks for your work afecelis
I will try codeblocks and see if it fits for me, looks quite promising, nice work mandrav
mandrav
Posts: 117
Joined: Sat Aug 27, 2005 8:29 pm
Contact:

Post by mandrav »

Nova wrote:Hey,

I have several questions about those env vars.
Does the codeblocks vars replace those system vars you proposed to set?!
And where can I set the Vars in codeblocks? I found the tab "Custom Variables" in the Compiler options but I am not quite sure if that is the right thing.
Yes, it's called "Custom variables". The next version will refer to it as "Env. variables" though ;)
And, yes, they are normal environment variables, i.e. they override all environment variables with the same name (always inside C::B program scope - not globally).

Yiannis.
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

you know i realised something as I'm converting to codeblocks here.

what the hell is the irrlicht lib file you compile the engine with and when was it made?

will it conflict with my altered version of irrlicht? I'm confused here wtf is that file for?

and a nice little bump for this thread...

if you wish not to spam this post any futher just pm me thanks. 8)
sRc
Posts: 431
Joined: Thu Jul 28, 2005 1:44 am
Location: Salt Lake City, Utah
Contact:

Post by sRc »

Midnight wrote:you know i realised something as I'm converting to codeblocks here.

what the hell is the irrlicht lib file you compile the engine with and when was it made?

will it conflict with my altered version of irrlicht? I'm confused here wtf is that file for?

and a nice little bump for this thread...

if you wish not to spam this post any futher just pm me thanks. 8)
the lib is generated when you compile Irrlicht, along with the DLL. you need to link it in the project so that it will compile.

if you're using a modified irrlicht DLL you need to link the modified Irrlicht LIB.
The Bard sRc

Blog | Twitter
Post Reply