warning LNK4042: The same object file was specified more than once
来源:互联网 发布:智能手环推荐 知乎 编辑:程序博客网 时间:2024/05/02 01:29
Background: Libjingle移稙到VS2010下编译。按照Scons给出的工程结构建立了5个lib工程,以及一个call工程。编译jingle时出现warning LNK4042。开始我不管,后来发现编译call出错,凡是在constants.h/constants.cc中定义的变量都不能用,会出现LNK2019 error(出现这个error说明在产生lib的工程中,有一些变量被声明,但没有被定义,也就是说有一些文件没有被编译。见博文:http://blog.sina.com.cn/s/blog_872c0f460100zlrn.html)。
解决:原文地址:Visual Studio 2010's strange “warning LNK4042”
$(IntDir)/%(RelativeDir)/
问题的原因是代码结构中出现了同名的文件,虽然在不同的文件夹,但VS2008以后的版本都默认忽略文件夹结构,也就是说所有的文件在编译时被认为是在一个文件夹里。而同名的文件自然会被忽略而不被编译。
最后用一句话总结:永远不要忽略任何Link的warning!
- warning LNK4042: The same object file was specified more than once
- Qt 使用qmake 遇到 warning LNK4042: object specified more than once; extras ignored 错误的处理办法
- (引)The item "obj/Debug/xxx.resources" was specified more than once the "Resources
- Column specified more than once in the INSERT list.
- “Pushing the same view controller instance more than once is not supported” exception
- iOS--错误集锦--pushing the same view controller instance more than once is not supperted
- ios解决bug--“Pushing the same view controller instance more than once is not supported”
- error "flag 'tab_complete_word' was defined more than once caffe
- nasm: error: more than one input file specified 原因
- nasm: error: more than one input file specified 原因
- nasm: error: more than one input file specified 原因
- fatal error C1047: The object or library file "..."was created with an older compiler than
- The object or library file 'xxx.obj' was created with an older compiler than other obj
- ceph 热迁移 live_migrate-XML error: CPU feature `pdpe1gb' specified more than once
- More than one file was found with OS independent path
- WKWebview崩溃问题Completion handler passed to was called more than once
- more than one row with the given identifier was found
- fatal error C1047: The object or library file "..."was created with an older compiler than other obj
- ACE中的栅栏(Barrier)
- 关于ios中的setNeedsDisplay和setNeedsLayout
- 建议的程序员学习LDA算法的步骤
- 汇编弱智错误
- 疑惑
- warning LNK4042: The same object file was specified more than once
- ACM
- 大数运算经典:棋盘上的米粒。
- LaTeX命令速查手册1
- NYOJ 33 蛇形填数
- DFS(1)
- HTML5标签的语义认知和理解(2)
- 用 Dijkstra算法解决的几道HDOJ题目
- erlang开发环境配置-支持中文的ide