如何公开静态库';s汇编程序,作为外部DLL的dllexport? 在64位VC++(2010)中不支持内联汇编程序,我最近将一个内嵌函数的70页静态C++库转换成一个直的64位汇编程序静态库。然后,包含静态库的64位DLL将无错误地构建,并正确链接asm函数。但是,将EXE链接到DLL时看不到asm函数,对于引用的每个唯一符号,都会出现LNK2001:unresolved external symbol错误

如何公开静态库';s汇编程序,作为外部DLL的dllexport? 在64位VC++(2010)中不支持内联汇编程序,我最近将一个内嵌函数的70页静态C++库转换成一个直的64位汇编程序静态库。然后,包含静态库的64位DLL将无错误地构建,并正确链接asm函数。但是,将EXE链接到DLL时看不到asm函数,对于引用的每个唯一符号,都会出现LNK2001:unresolved external symbol错误,c++,assembly,64-bit,dllexport,win64,C++,Assembly,64 Bit,Dllexport,Win64,静态库汇编程序代码如下所示: public My_func My_func proc ... endp 包含静态库的DLL声明: extern "C" __declspec(dllexport) My_func (some_arguments); extern "C" My_func (some_arguments); // __declspec(dllimport) here doesn't help 链接到DLL的EXE声明: extern

静态库汇编程序代码如下所示:

public   My_func
My_func  proc
         ...
         endp
包含静态库的DLL声明:

extern "C" __declspec(dllexport) My_func (some_arguments);
extern "C" My_func (some_arguments);  // __declspec(dllimport) here doesn't help
链接到DLL的EXE声明:

extern "C" __declspec(dllexport) My_func (some_arguments);
extern "C" My_func (some_arguments);  // __declspec(dllimport) here doesn't help

<>我使用了整个CDECL,并编译为C++代码。我没有东西可以尝试了,我错过了什么?如果可能的话,我希望避免向其中添加.DEF文件。

我建议使用DEF文件。@Chris-实际使用C编译器编译时,
extern“C”
函数的名称是什么<代码>\u My\u func?是的,关于_My\u func,您是正确的,这也是ml64为其生成的。现在我已经认输了,并且使用了一个.DEF文件,但它仍然有效,而且现在能够在主要目标上取得进展。最好是一个decspec解决方案。