Tuesday, September 13, 2011

C# / C++ - DLL not found error

Sometime, it is rather frustrating to work with C++. I always wish that they could feedback more useful error when there is a crash of a system.

This post is related to System.DllNotFoundException: Unable to load DLL 'xxxx.dll'. Well, this is a C# DLLImport error, but, it is kind of related to C++. DLL not found error does not really means that xxxx.dll is not found. It may means that the dll that xxxx.dll depends on is not found

Do the following check point if you encounter this error

1. Check if the xxxx.dll exist at the directory of your application or your library search path
2. If xxxx.dll exist go to ----- to download Dependency Walker. Dependency Walker is a nice program to tell you which dependency is missing/linked/needed
3. Drop xxxx.dll to Dependency Walker. Dependency Walker will load the DLL and search for missing dll
4. If you have a missing DLL dependency. It will prompt you as an error.
5. Try to locate the missing library and place it on your application or library search path.


  1. This does not always work with C++ when you develop using VS2008 and higher. This is because of the side by side loading architecture that exist in Windows. You cant place the dll in your application folder and get it working just like that.

  2. check this useful error loading dll file post to find more info about this problem...


Hadoop - How to setup a Hadoop Cluster

Below is a step-by-step guide which I had used to setup a Hadoop Cluster Scenario 3 VMs involved: 1) NameNode, ResourceManager - Host...