gpt4 book ai didi

c++ - 过程入口点无法位于动态链接库 Core.dll 中

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:17:49 26 4
gpt4 key购买 nike

我正在将我的项目转换为使用 DLL,并试图拆分我的 Singleton 类以避免使用模板。

我的类LudoMemory,最初继承自Singleton。我现在正在尝试为其提供销毁和创建自身的功能,并让我的主引擎不依赖于 Singleton

我写了一个像这样的简单销毁方法:

LudoMemory *memory_Singleton = NULL;

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

在运行程序时(没有编译器错误)我收到这个错误:

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

LudoCoreLudoMemory 所属的项目。为什么会这样?我该如何解决?

最佳答案

您的系统上没有多个版本的 ludocore.dll,是吗?过程入口点错误通常意味着:您针对 ludocore.lib 版本 x 编译项目,并且在运行程序时,它使用 ludocore.dll 版本 y,而版本 y 未定义 LudoMemory::Destroy()。

关于c++ - 过程入口点无法位于动态链接库 Core.dll 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1578950/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com