链接警告:warning LNK4070 :/OUT...
2014-09-28 17:35
134 查看
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
我在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
相关文章推荐
- 链接警告:warning LNK4070 :/OUT...
- 链接警告:warning LNK4070 :/OUT...
- 关于链接警告LNK4070
- 解决 Debug编译时,警告:warning LNK4099: 未找到 PDB“vc90.pdb”
- 连接程序时警告误:warning LNK4089
- 链接警告:warning LNK4070: /OUT:dll.dll directive in .EXP
- b.exp : warning LNK4070: .EXP 中的 /OUT:a.dll 指令与输出文件名“b.dll"不同;忽略指令
- 消灭编译警告(Warning)
- LNK4070 VS2010
- 解决ld: warning: directory not found for option"已删除路径"警告
- 编译警告 warning: extra tokens at end of #undef 解决
- [转]LINK : warning LNK4089: all references to "xxx.dll" discarded by /OPT:REF
- LR脚本回放,日志中提示警告: Warning -27796 和 Warning -26000
- Tomcat后台警告信息:WARNING: Parameters: Invalid chunk ignored.
- python解决SNIMissingWarning和InsecurePlatformWarning警告
- WARNING: inbound connection timed out (ORA-3136)
- sql 2008 修改链接服务器 Rpc &Rpc Out
- 出现 warning: Clock skew detected. Your build may be incomplete.这样的警告
- VC++的链接错误LNK2005
- 如何解决Linux下Qt Creator调试C/C++程序出现Debugging starts &"warning: GDB: Failed to set controlling terminal警告