views:

800

answers:

2

I've recently been tinkering with a little gameproject using VC++ 2008. I'm using SDL, OpenGL, Boost and Box2D as included libraries. It works fine on my windows 7 machine, aswell as a friend's w7 machine. How ever it wont work on my second friend's XP sp3 machine, with the vc++ 2008 SP1 redist pack installed. When he starts the .exe he get's the error:

"The procedure entry point _ftol2 could not be located in the dynamic link library msvcrt.dll"

Most forum threads I've read suggests that the msvcrt.dll is corrupt or outdated. My version of the msvcrt.dll is 7.0.7600.1385 and his is 7.0.2600.5512 . Can't find an update for it, can't simply replace it because it reverts to the old version on reboot, and it doesn't seem to help to simply include my msvcrt.dll in my game's folder. According to this thread on gamedev.net, OpenGL32.dll calls the _ftol2. Their conclusion is to install the vc++ 2008 redist pack, which I've mentioned is already installed.

Any ideas that might shed light on a solution to this error?

Edit: Using Dependency Walker I assured that OpenGL32.dll and GLU32.dll does indeed call the _ftol2 in MSVCRT.dll. How do I avert this dependency?

+1  A: 

You need to determine what is referencing MSVCRT.DLL. Nothing should be - this is the Windows version of the CRT. Your application should be linking against MSVCRT90.DLL.

superoptimizer
According to the thread I linked to, OpenGL32.dll calls MSVCRT.dll. How would I go about to determine what my included libraries reference to, and how would I change those references?
Sir Oddfellow
A: 

I shouldn't have included the opengl32.dll from my system with my game. The opengl32.dll on XP is an older version and is properly linked with the MSVCRT.dll on XP aswell. When I included the windows 7 opengl32.dll it simply didn't match with the xp dlls. Removing the opengl32.dll and glu32.dll from my game folder solved the problem and the game works fine.

Sir Oddfellow