Skip to main content
gamedev.net
🔒 Locked

OPENGL32.dll linking with MSVCRT.dll problem

Started by rumble Jul 16, 2009 at 9:12 AM 5 replies 12.5k views
Original Post
rumble
rumble
Hope this is not OT My app's exe calls c:\windows\system32\OPENGL32.dll (Version 6.0.6000.16386) which calls _ftol2 and other functions in c:\windows\system32\MSVCRT.dll But depending on the version of MSVCRT.dll shipped with Windows Xp or Vista, the function _ftol2 may or may not be present. And if I manually replace the MSVCRT.dll in windows\system32 with the version with the _ftol2 function, I get blue screen upon restart. How to resolve? Thanks
Evil Steve
Evil Steve
Surely that's a problem with the installation of OpenGL then? The version of OpenGL32.dll on your machine should link with the version of MSVCRT.dll on your machine. You should never be copying any DLLs into system32.

What exact errors are you seeing?
rumble
rumble
Upon executation of my exe, I get "The procedure entry point _ftol2 could not be located in the dynamic link library msvcrt.dll". I use dependency checker and it tells me OPENGL32.dll calls this _ftol2.

My exe works on Windows Vista. But on XP, the MSVCRT.dll shipped with the system misses the _ftol2, _except_handler_common4 functions.

And my naive attempt to copy the Vista MSVCRT.dll to Xp results blue screen.
Evil Steve
Evil Steve
Quote:
Original post by rumble
Upon executation of my exe, I get "The procedure entry point _ftol2 could not be located in the dynamic link library msvcrt.dll". I use dependency checker and it tells me OPENGL32.dll calls this _ftol2.

My exe works on Windows Vista. But on XP, the MSVCRT.dll shipped with the system misses the _ftol2, _except_handler_common4 functions.

And my naive attempt to copy the Vista MSVCRT.dll to Xp results blue screen.
Where did you get the OpenGL32.dll on XP then? The one on my PC (XP SP3, DLL version 5.1.2600.5512) links to _ftol in MSVCRT.dll, not _ftol2. It sounds to me like your OpenGL driver / install is corrupt somehow.
rumble
rumble
Yes, on XP, the OPENGL32.dll on mine is the same version, and msvcrt.dll is 7.0.2600.5512

on Vista, OPENGL32.dll is 6.0.6000.16386, where as msvcrt.dll is 7.6001.18000

I have to point out if you just throw only OPENGL32.dll (no matter version) into Depends, it will show it needs _ftol only.

But if you throw my app.exe into Depends, it will show it needs _ftol2, _ftol2_sse and more as well in msvcrt.dll due to OPENGL32.dll.

Since I develop on Vista, I use the 'set up install' project in MSVC2008 to create installer. Perhaps I have to set up a dev environment on XP system to produce a installer that works on XP?

Quote:
Original post by Evil Steve
Quote:
Original post by rumble
Upon executation of my exe, I get "The procedure entry point _ftol2 could not be located in the dynamic link library msvcrt.dll". I use dependency checker and it tells me OPENGL32.dll calls this _ftol2.

My exe works on Windows Vista. But on XP, the MSVCRT.dll shipped with the system misses the _ftol2, _except_handler_common4 functions.

And my naive attempt to copy the Vista MSVCRT.dll to Xp results blue screen.
Where did you get the OpenGL32.dll on XP then? The one on my PC (XP SP3, DLL version 5.1.2600.5512) links to _ftol in MSVCRT.dll, not _ftol2. It sounds to me like your OpenGL driver / install is corrupt somehow.


V-man
V-man
Sounds like MSVCRT.dll needs to be updated on Win XP.
You would have to install the redistrub of VC++2008.
Evil Steve
Evil Steve
Quote:
Original post by rumble
I have to point out if you just throw only OPENGL32.dll (no matter version) into Depends, it will show it needs _ftol only.

But if you throw my app.exe into Depends, it will show it needs _ftol2, _ftol2_sse and more as well in msvcrt.dll due to OPENGL32.dll.
Your app isn't installing MSVCRT.dll then - You need to install the Microsoft Visual C++ 2008 Redistributable Package (x86) on any machine you deploy your VC 2008 application on.

EDIT: Whoops, that's what V-man just said.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.