tbk
tbk

Reputation: 71

LoadLibrary fails with error code 14001

I'm using Visual C++ 2008 Express Edition to create a resource only DLL. The problem I'm facing is that running the application that makes use of the DLL on another computer besides mine results in LoadLibrary() function failing with error code 14001.

Searching throught the internet it seems to be a dependecy problem of the computer running the application lacking libraries of the Microsoft Visual C++ 2008 Redistributable Package.

My first step was to install the latest Microsoft Visual C++ 2008 Redistributable Package but that didn't solved the problem.

Also I changed my project setting so the DLL compiles with static CRT linking assuming that this way I will get rid the dependencies.

These options seem to be the workarounds for other people having the same issue. Any idea in which direction to look is highly appreciated.

Thanks

==================================================================================

Thanks for your answers.

Both Dependency Walker and the event viewer indicated a side-by-side configuration problem as I was missing a debug version library of the VC++ Redistributable Package.

I was careless and have compiled my DLL in debug mode, recompiling in release mode solved the problem.

Upvotes: 7

Views: 16843

Answers (3)

Ruud van Gaal
Ruud van Gaal

Reputation: 149

I had the same issues but with Visual Studio 2013; a debugging set of DLL's which required a manifest. In my case Microsoft.DTfW.DHL.manifest and dbghelp.dll had to be added to the path (I used the exe directory).

Upvotes: 0

vitakot
vitakot

Reputation: 3844

Try to isolate missing library by Dependency Walker:

http://www.dependencywalker.com/

Just run your application on the second computer with this tool, it should tell you what library is missing. Be sure you are installing the right version of Visual C++ 2008 Redistributable Package; there are two of them, for VS 2008 with SP1 and without any SP...

Upvotes: 7

MK.
MK.

Reputation: 34587

Look in the eventviewer. Good chance there will be an error there from Windows SideBySide explaining which assembly is missing.
Likely it would be a VC CRT runtime which you will have to bundle with your dll.

(the VC redistributable is available here: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=29)

Upvotes: 4

Related Questions