在 export.def 文件中可以放置这样的行:
LIBRARY plug
EXPORTS
funcName
main=funcName
这样导出函数有什么效果?它是否导出属于同一函数的两个函数名称?或者它只是导出函数,给它另一个名字?
最佳答案
根据 MSDN :
The EXPORTS keyword can be on the same line as the first definition or on a preceding line. The .def file can contain one or more EXPORTS statements.
The syntax for export definitions is:
entryname[=internalname] [@ordinal [NONAME]] [PRIVATE] [DATA]
entryname is the function or variable name that you want to export. This is required. If the name you export is different from the name in the DLL, specify the export's name in the DLL with internalname. For example, if your DLL exports a function, func1() and you want it to be used as func2(), you would specify:
EXPORTS func2=func1
关于c++ - 从 DLL 语法导出函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7287400/