Setting up with Dev-C++...

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Neo
Posts: 2
Joined: Fri Jan 16, 2004 7:43 am

Setting up with Dev-C++...

Post by Neo »

I've just downloaded Irrlicht and Dev-C++, and I was reading the tutorial for setting up Dev-CPP for use with Irrlicht, and step five says this:
Step 5 -- Using the Irrlicht DLL at Runtime

In order to run your applications from within Dev-C++, for debugging, or just for the sake of not having to go outside the IDE to run them, the "irrlicht.dll" supplied with Irrlicht must be in your PATH. With Windows, there are two simple ways to do this:

1. Add the "irrlicht-0.3\bin" directory from Step 1 to your PATH.
2. Copy "irrlicht.dll" to your windows\system32 directory, which is in the PATH by default.

I'm not sure that any one method is better than the other -- I use the first one in my programs, but both work.
Now where exactly does that mean I put the dll? Directly in the system32 folder? And how do I get Dev to recognise the dll is even in there?

Thanks for any help.
yikyak
Posts: 12
Joined: Tue Jan 13, 2004 1:54 am

Some answers

Post by yikyak »

Your PATH is what's called an 'environment variable'. Environment variables are variables that are (usually) loaded into the computer's memory at boot time and stay there.

The environment variable PATH is a list of directories that your computer automatically searches whenever it's looking for a given file or program.

On Windows it's a semi-colon-separated list of directories that usually looks something like this:
.;C:\some\folder;C:\another\folder;C:\yet\another\folder
On Unix-style systems it's colon-separated and looks like this:
.:/etc/folder:/usr/bin/a_folder
[NB: the full-stop/period means 'the current directory']

On Windows 98 it can be set using the system configuration utility, or by manually hacking the autoexec.bat file in the c:\ directory. On Windows 2000 there's a config utility that does it. On Unix it can be set from almost anywhere in a number of different ways.

Your c:\windows\system directory (or System32 on 2k+) is automatically in your PATH, so anything you put in there will get found automatically. What the tutorial was saying was that if you put the DLL in that folder, it will always get found, otherwise you should make sure that wherever you put it is in your PATH. The 'current directory' is usually always in your PATH too, so if you have the dll wherever you're writing and compiling your program it should get found and work.

Hope that helps ;)
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post by keless »

it should be noted that if you're switching back and forth between DevCPP and MSVC, putting the DLL in the system32/ dir is not the best choice, because you'll need to keep switching out the DLL for the two different compilers.

I keep the .dll in the same directory as the .exe runs in, so I can switch out the DLL for each different project independantly.
a screen cap is worth 0x100000 DWORDS
Neo
Posts: 2
Joined: Fri Jan 16, 2004 7:43 am

Post by Neo »

I'm gonna put the dll in the same dir as the project, it's just easier that way, so thanks for the help.
Post Reply