Cannot load library error 126
Posted on 2011-03-21
I have a big problem.
I developed a DLL file for MetaTrader via Visual Studio Express 2010 C++.
Metatrader is a forex trading program which is programmable and can use any DLL file by import function.
I have used the VS express on Windows 7 x64 op system.
The express can not use x64 (as I know) so everything is built as x86 (32bit), I have checked it via Properties (management).
The problem: I built DLL file on my machine and it is working perfectly under MetaTrader but only on my machine. (perhaps VS copied some needed files)
When I tried it on other machine (WIn XP (x86)) then I got an error message: cannot load library error 126
Dependency Walker shows the following DLLs are missing (only on WIN XP machine):
I downloaded them and put to experts/libraries (next to my dll file).
(metatrader can find any DLL which copied to this 'libraries' )
The problem still exists.
I changed the Use of MFC from shared to static in VS and rebuilt the DLL.
Properties/Configuration Properties/General/Use of MFC=Use MFC in a Static Library
Properties/C++/Code Generation/Runtime Library=(/MDd)
I set these ones what I gathered of forums, etc...
The problem still exists. (DLL files are missing further)
I think it is a compier setting problem but I do not know what.
Do you have any advice for me?