c++ - “The procedure entry point… could not be located” 在错误的 DLL 中

标签 c++ haskell dll

我已经从 Haskell 代码创建了一个 DLL,我正在从 C++ 调用这个 DLL。当我在 Visual Studio 2010 中以 Debug模式运行时,我的应用程序工作正常,但是当我制作发布版本并安装它时,出现错误

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

AdvancedMath.dll 是我基于 Haskell 的 DLL。奇怪的是函数 GetDataChunk 不在那个 DLL 中——它在我链接的另一个 DLL 中,而当我添加 Haskell DLL 时,那个 DLL 或我的应用程序对它的使用没有任何改变。

此错误消息似乎在说 Windows 对哪些函数存在于哪些 DLL 中感到困惑。这里可能出了什么问题?

最佳答案

这看起来是 Visual Studio 2010 Release模式中的一个错误(Haskell dll 函数不是由在 Release模式下构建的 exe 导入的,因此没有加载 Haskell dll,在调试中存在导入并且它工作正常)。

使用 Visual Studio 2013 Update 4 和 Visual Studio 2015 RC 在 Release模式下构建的同一个 exe 项目运行良好。

关于c++ - “The procedure entry point… could not be located” 在错误的 DLL 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31416185/

相关文章:

c++ - 为什么 .c_str() 不在字符串末尾添加 '\0' ?

c++ - "missing return statement",但我知道它在那里

Haskell 函数组合错误

haskell-platform - HDBC -odbc 与 haskell 连接

list - Haskell将值赋给理解内的变量

multithreading - 调用 Delphi DLL 的意外线程行为

c++ - 我应该在公共(public)接口(interface)的结构中将相关参数分组吗?

delphi - 从内存单元加载 DLL - 如何使用?

c++ - 为什么 C++ 析构函数会发生这种情况?

使用抽象接口(interface)的 C++ Dll 边界 -> header 中的智能指针?调用删除?