问题描述
我将我的项目转换为使用DLL,并试图拆分我的 Singleton
类,以避免使用模板。
I am converting my project to use DLLs and am trying to break apart my Singleton
class to avoid using templates.
我的类, LudoMemory
,最初继承自 Singleton
。我试图给它的功能,现在销毁和创建自己,让我的主机不依赖 Singleton
。
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
.
我写了一个简单的destroy方法,例如:
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:
LudoCore
是 LudoMemory
所属的项目。为什么会发生这种情况?我如何解决它?
LudoCore
is the project that LudoMemory
belongs to. Why is this happening? How can I solve it?
推荐答案
您的系统上没有多个版本的ludocore.dll,
过程入口点错误通常意味着:您编译的项目对ludocore.lib版本x,当运行程序,它使用ludocore.dll版本y,版本y没有定义LudoMemory :: Destroy()。
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().
这篇关于程序入口点不能位于动态链接库Core.dll中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!