c++ - 无法导出 C++ Builder 64 位 DLL 中的函数

标签 c++ dll 64-bit c++builder

我正在使用 C++ Builder XE4,尝试创建带有一些导出函数的 64 位 DLL。

这是一些测试代码:

#include <vcl.h>
#include <windows.h>

#pragma hdrstop
#pragma argsused

int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void* lpReserved)
{
   return 1;
}

extern "C" __declspec(dllexport) __stdcall void Test()
{
   // do smth
}

我创建了两个 DLL,一个具有 32 位的目标平台,另一个具有 64 位的目标平台,然后使用 impdef.exe 检查这两个 DLL。

使用 32 位 DLL 一切正常,我在 cmd 中看到了这一点:

EXPORTS
Test
___CPPdebugHook

对于 64 位 DLL,我看到的是:

EXPORTS

原因是什么?在 Embarcadero c++ 中创建 64 位 DLL 的正确方法是什么?

非常感谢。

最佳答案

你的dll没有问题。使用DependencyWalker (depends.exe) 而不是 impdef.exe 来查看导出的函数。

关于c++ - 无法导出 C++ Builder 64 位 DLL 中的函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19583953/

相关文章:

c++ - 为游戏制作地址查找器

c++ - 如何在我的 C++ 项目中包含 activeX 库?

.net - 强制在 x64 上为 32 位应用程序重定向文件

.net - 在 x64 系统上抛出 StackOverflowException;在 x86 上正常工作

c++ - std::allocator_traits::construct 调用了错误的构造函数

c# - C++中指针和C#中引用类型的区别

java - 无法运行程序 "\ndk-build.cmd": Launching failed

c++ - 在 C++ 中使用 startMATLAB 并在 r2017b 中使用 "MatlabEngine.hpp"时发出问题

python - 从哪里获取适用于 Visual Studio 的 Python DLL?

64-bit - MongoDB限制存储大小?