Running Irrlicht Tutorials - Visual Studio Express

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
so1odo1o
Posts: 32
Joined: Sat Apr 03, 2010 10:29 am

Running Irrlicht Tutorials - Visual Studio Express

Post by so1odo1o »

I have been trouble for the past week trying to get the Irrlicht Tutorials to work on my Windows 7, 64-bit system using Visual Studio Express.

A few problems I have been getting:
- Unable to find Irrlicht.dll

The Visual Studio Express does not contain a x64 compiler. Will this be an issue for me? In the project properties, it says my active platform is Win32. So does that mean I can use the Irrlicht.dll file from Irrlicht's Win32 bin?

I've tried that and still get a problem that says unable to load model. I really need help. I've been losing too much time figuring this out. Please help me.
so1odo1o
Posts: 32
Joined: Sat Apr 03, 2010 10:29 am

Post by so1odo1o »

By the way, can Irrlicht run on VISUAL C++ 2010??
slavik262
Posts: 753
Joined: Sun Nov 22, 2009 9:25 pm
Location: Wisconsin, USA

Re: Running Irrlicht Tutorials - Visual Studio Express

Post by slavik262 »

so1odo1o wrote:A few problems I have been getting:
- Unable to find Irrlicht.dll
You need to copy Irrlicht.dll into the project folder or your SysWOW64 folder for the program to find it.
so1odo1o wrote:The Visual Studio Express does not contain a x64 compiler. Will this be an issue for me? In the project properties, it says my active platform is Win32. So does that mean I can use the Irrlicht.dll file from Irrlicht's Win32 bin?
Yes, you can use the win32 version. The fact that VS Express doesn't have an x64 compiler isn't a problem - you can just compile for x86 and it will run just fine on x64 systems. If you need to compile the program as 64-bit for some reason, you'd have an issue, but I don't imagine you'd be doing that.
so1odo1o wrote:I've tried that and still get a problem that says unable to load model. I really need help. I've been losing too much time figuring this out. Please help me.
We can help a lot more if you explain how you're doing it, what you've tried, and show us your code.

And yes, Irrlicht builds just fine on VS 2010. I just installed it today. Pretty, isn't it?
so1odo1o
Posts: 32
Joined: Sat Apr 03, 2010 10:29 am

Post by so1odo1o »

I agree, it looks beautiful.

Now I am getting the missing Irrlicht.dll when I press the play button after building, set to debug. I then copied the Irrlicht.dll taken from Irrlicht>bin>Win32-VisualStudio and stored it in the debug folder within my project folder.

Like I said I am getting the mesh loading error:

Code: Select all

'IrrlichtTuts.exe': Loaded 'C:\Windows\SysWOW64\uxtheme.dll', Cannot find or open the PDB file
Could not load mesh, because file could not be opened: : C:UsersBrentLibsIrrlichtmediasydney.md2
The program '[6344] IrrlichtTuts.exe: Native' has exited with code 1 (0x1)
.

Just coming from OSX, I am not sure if the path I am using is correct, but it looks so. Here's my code where I give the path to the sydney mesh:

Code: Select all

IAnimatedMesh* mesh = smgr->getMesh("C:\Users\Brent\Libs\Irrlicht\media\sydney.md2");
And I am running tutorial 1 by the way. Let me know what you think. Thanks!

EDIT: FIXED! I was assuming that paths in the Windows system used "\" instead of "/". But that was it, got it running. Thanks for the advice slavik.
slavik262
Posts: 753
Joined: Sun Nov 22, 2009 9:25 pm
Location: Wisconsin, USA

Post by slavik262 »

so1odo1o wrote:Now I am getting the missing Irrlicht.dll when I press the play button after building, set to debug. I then copied the Irrlicht.dll taken from Irrlicht>bin>Win32-VisualStudio and stored it in the debug folder within my project folder.
Visual Studio is a little weird. If you're running it from the IDE, you actually have to put the dll in the same folder as your source code files. If you're running it by browsing to the debug folder and executing the executable (sorry for the redundancy), you can just put it in the debug folder.
so1odo1o wrote:

Code: Select all

IAnimatedMesh* mesh = smgr->getMesh("C:\Users\Brent\Libs\Irrlicht\media\sydney.md2");
Aha! To put a '\' character in a string, you type \\. This is because backslash actually marks a special type of character called a control character. It's how you put quotation marks in your strings (with ") and how you insert newlines and carriage returns (\n and\r, respectively). Your alternative would just be to use forward slashes (C:/Users/Brent/Libs/Irrlicht/media/sydney.md2). You're right about Windows using backslashes in its paths, but it is smart enough to know what you mean.

EDIT: Glad you got it working in the time it took me to respond. :P
Brainsaw
Posts: 1241
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

slavik262 wrote: [...]
Visual Studio is a little weird. If you're running it from the IDE, you actually have to put the dll in the same folder as your source code files. If you're running it by browsing to the debug folder and executing the executable (sorry for the redundancy), you can just put it in the debug folder.
[...]
I don't know VC that well, but in CodeBlocks you have to set the execution folder. This is the folder that the program will use to load anything it needs, e.g. models and dlls.
Image
Dustbin::Games on the web: https://www.dustbin-online.de/
ArakisTheKitsune
Posts: 73
Joined: Sat Jun 27, 2009 6:52 am

Post by ArakisTheKitsune »

Brainsaw wrote:
slavik262 wrote: [...]
Visual Studio is a little weird. If you're running it from the IDE, you actually have to put the dll in the same folder as your source code files. If you're running it by browsing to the debug folder and executing the executable (sorry for the redundancy), you can just put it in the debug folder.
[...]
I don't know VC that well, but in CodeBlocks you have to set the execution folder. This is the folder that the program will use to load anything it needs, e.g. models and dlls.
Same is in VC, there you have to set debug and release folder. By default debug folder is in source directory and default release folder is in release folder :)
Knowledge is power, understanding is wisdom.
Post Reply