简体   繁体   English

在C ++静态库中导出函数

[英]Export function in c++ static library

My app links to a third party static library which without source code and I find that a function implemented in this library is exported in my exe using dumpbin.exe, just like a export function in a DLL. 我的应用程序链接到没有源代码的第三方静态库,并且我发现使用dumpbin.exe在此exe中导出该库中实现的功能,就像DLL中的导出功能一样。 I have tried to modify the header file provided by the library, got rid of all the __declspec(dllexport) stuffs, and relink my app, but the function is still exported. 我试图修改该库提供的头文件,摆脱了所有__declspec(dllexport)的内容,并重新链接了我的应用程序,但是该函数仍被导出。 Does it have a way to make it unexported? 是否有使其不导出的方法?

No. You will have to recompile the library itself, changing the header will not affect the library binary code. 否。您将不得不重新编译库本身,更改标头不会影响库的二进制代码。 What problems is the exported function causing you? 导出的功能导致您什么问题?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM