Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Entry Point Not Found

Tags:

c++

dll

I am encountering a weird error when attempting to run an application (which I haven't changed the code for for a while as it works okay) linking to my DLL. This DLL used to work, but I've been making changes to the DLL's code and got it to compile okay. Unfortunately, when trying to run the application...

---------------------------
GameTest001.exe - Entry Point Not Found
---------------------------
The procedure entry point ??0Music@@QAE@ABV0@@Z could not be located in the dynamic link library Renderer02.dll. 
---------------------------
OK   
---------------------------

I have no idea how to interpret this error. I know what changes I have made, and my code looks fine to me. I've tried Googling this and had no luck at all.

Can anyone shed any insight to this? What does this error mean?

like image 342
Interminable Avatar asked Jun 16 '13 18:06

Interminable


People also ask

What is a procedure entry point?

The procedure entry point error message usually appears when trying to run certain games using Uplay. According to users, the issue can occur if your game files are corrupted. To fix the problem, you'll need to check the integrity of your game cache.


1 Answers

You are linking to a function that has been exported with a mangled name, and that name is ??0Music@@QAE@ABV0@@Z. The DLL that is being loaded does not export a function of that name and hence the error.

The name mangling encodes the function's name, parameters and return value. So the most likely cause for the mismatch is that you have changed the name, parameters or return value of the function in one place but not the other.

If you have changed the DLL you'll need to re-compile it to produce new .lib and .dll files. You will also have modified the .h file. Make sure that the modified versions of all three of those files are used by the program that links to the DLL.

This error message is actually helpful to you because it will make sure that both sides of the interface match before you can proceed to execute the code.

Update

I didn't make it clear enough in the text above. Whenever you change the interface of the DLL you must do the following:

  1. Update any .h files that are used by the application.
  2. Re-compile the DLL to produce new .lib and .dll files.
  3. Re-compile the application using the updated .lib and .h files.
  4. Distribute the new .dll file so that the updated application loads the updated DLL.
like image 101
David Heffernan Avatar answered Nov 03 '22 01:11

David Heffernan