您的位置:首页 > 其它

链接警告:warning LNK4070 :/OUT...

2010-07-29 18:21 465 查看
dllD.exp : warning LNK4070: /OUT:dll.dll directive in .EXP differs from output filename "Debug/dllD.dll"; ignoring directive

我在DLL项目中遇到了,因为要对Debug版和Release版分别指定不同的输出文件名。对Debug版,我指定输出文件为dllD.dll,对Release版指定为dllR.dll。

解决方法有两个:(1)删掉自动生成的dll.DEF文件,在代码中使用_declspec(dllexport)导出函数;(2)删掉dll.DEF文件中LIBRARY字段后面双引号及其内部的库名即可,也可以将其改掉。如改为:

; dll.def : Declares the module parameters for the DLL.

LIBRARY "dllD"
DESCRIPTION 'dll Windows Dynamic Link Library'

EXPORTS
; Explicit exports can go here
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: