Could not find procedure entry point

I have a program that I am writing program.exe, it loads a dll lib.dll. When I run program.exein debug mode, everything works fine. When I try to start in release mode, I get an error message:

The procedure entry point ... could not be located in the dynamic link library lib.dll.

When I open a dll in a dependent walker, there is an exact function with all the same strange characters. I looked at the module window in visual studio to make sure that I am not loading the dll from the wrong directory, but that is not the case. I compiled both dll and exe with the same compiler (Visual Studio 2012), so this is not a problem either. What could be the reason for this?

Edit:

I converted lib.dllto a static library and everything works fine. I give up!

+4
source share
2 answers

I ran into the same problem, and in my case it happened because I had two versions of the same library installed on my computer.

In the end, the problem was that I was linking my program to the new LIB file, while my PATH was pointing to the old DLL. When the library version number is not included in the LIB or DLL file names, it is very easy to mix versions.

+1
source

Try setting the library path on the property pages for Release assemblies also when starting the Release assembly.

0
source

All Articles