Procedure entry point cannot be located in the core.dll dynamic link library

I am converting my project to use a DLL and am trying to break my Singleton class to avoid using templates.

My class, LudoMemory , originally inherited from Singleton . I'm trying to give it functions to destroy and create itself now, and my main engine does not rely on Singleton .

I wrote a simple way to destroy:

 LudoMemory *memory_Singleton = NULL; void LudoMemory::Destroy() { LUDO_SAFE_DELETE(m_Singleton) } 

and when I start the program (without compiler errors) I get this error:

Procedure entry point? Destroy @LudoMemory @@ SAXXZ could not be located in the dynamic link library LudoCore.dll

LudoCore is the project that owns LudoMemory . Why is this happening? How can I solve it?

+6
c ++ dll linker singleton visual-studio-2005
source share
3 answers

You do not have multiple versions of ludocore.dll on your system, right? Errors in the procedure entry points usually mean: you compiled your project using ludocore.lib version x, and when you run the program, it uses the version ludocore.dll y, and version y does not detect LudoMemory :: Destroy ().

+8
source share

Jacob's answer about multiple versions of the DLL seems likely.

In addition, with some build systems, you must explicitly specify which functions will be exported to the DLL.

Examine the build environment and see if you should provide a list of methods that will be exported as a starting point.

+2
source share

In the Visual Studio build environment, you can also try disabling links in the linker optimization settings [ No (/ OPT: NOREF) ]

0
source share

All Articles