Page 1 of 1

[SOLVED] MS VC++ 2003 problem...

Posted: Fri Feb 25, 2005 11:36 am
by dakz0rz
Hello
I am having a problem with Irrlicht. I am trying get it to run correctly except it won't let me do that. I have written the code and done the required linking and that does not work.

I also get the HelloWorld example .sln file and compile it. It compiles alright, yet when I try to run it, it comes up with this error.

Code: Select all

Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call.  This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.
It also has a yellow arrow on the left hand side pointing at the line with this on it.

Code: Select all

IVideoDriver* driver = device->getVideoDriver();
Has anyone come across this problem before?[/code]

Posted: Fri Feb 25, 2005 1:33 pm
by saigumi
This happens when you compile with one version of a library but run it against the other version of the dll.

Are you compiling with the 0.8 lib, but have the 0.7 dll in your path?

Posted: Sun Feb 27, 2005 12:48 am
by dakz0rz
I only have the 0.8 version on my computer.
A while ago I tried it with the 0.7 version and the same thing happened. But the 0.7 version is long gone from my computer

Posted: Sun Feb 27, 2005 2:10 am
by Spintz
Copy the Irrlicht.dll file to $(windir)\system32

Posted: Sun Feb 27, 2005 5:55 am
by dakz0rz
Well well well..
I guess I didnt delete it all...
When I copied the v0.8 DLL in System32 it came up to replace the v0.7 DLL.
Thanks guys

Posted: Sun Feb 27, 2005 3:12 pm
by Spintz
To make your life even easier, if you're re-compiling the Irrlicht engine add these 3 lines to the project setting "Build Events -> Post-Build Event"s for All Configurations -

Code: Select all

copy $(TargetDir)\IrrlichtNX.lib ..\..\lib\VisualStudio
copy $(TargetDir)\IrrlichtNX.exp ..\..\lib\VisualStudio
copy $(TargetDir)\IrrlichtNX.dll $(windir)\system32