< Back

Add-on cannot be loaded.


Problem:

I wrote an add-on that runs fine on my machine. But when a co-worker tries to load it on his PC he get the message:

 Add-on xxx.dll cannot be loaded. (126): The specified module could not be found.

Solution:

1. Make sure that the add-on is compiled as a release build.

2. Verify that the add-on dll is located in a directory which is in the current path.

3. Try running the add-on with an absolute path (i.e. tecplot -loadaddon C:\tecplot\addons\myaddon.dll)

If this doesn’t help the add-on is most likely dependent on a library (DLL) that cannot be found. This can happen even if you are not specifically linking with other dlls. It could also happen if a static library you are linking with requires a dll that is not found.

The easiest way to discover the missing library is by using Dependency Walker. In Dependency Walker select File/Open… and open your add-on DLL. Once the offending DLL is discovered make sure it exists on the machine and is in the DLL search path.

The search path used by Windows to locate a DLL is described here.