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

孤者浪人 提交于 2019-12-21 04:51:05

问题


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

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

I have written a simple destroy method like such:

LudoMemory *memory_Singleton = NULL;

    void LudoMemory::Destroy()
    {
        LUDO_SAFE_DELETE(m_Singleton)
    }

and upon running the program (no compiler errors) I recieve this error:

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

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


回答1:


you don't have multiple versions of ludocore.dll on your system, do you? Procedure entry points errors usually mean: you compiled your project against ludocore.lib version x, and when running the program, it uses ludocore.dll version y, and version y does not define LudoMemory::Destroy().




回答2:


Jacob's answer about multiple DLL versions seems likely.

Also, with some build systems, you must explicitly list which functions will be exported in a DLL.

Research your build environment, and see if you must provide a list of methods to be exported as an entry-point.




回答3:


In Visual Studio build environment, also you could try by disabling the References in Linker Optimization Settings [ No(/OPT:NOREF)]



来源:https://stackoverflow.com/questions/1578950/the-procedure-entry-point-could-not-be-located-in-the-dynamic-link-library-core

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!