2012年12月7日 星期五

error LNK2005: * already defined in *.lib(*.obj)

Problem:
When I build Seahorse in branch bsquare, sometimes I got lots of linking error like this
error LNK2005: * already defined in *.obj
I’m sure it had been successful built before, but it doesn’t work now.


Solution:
I found it can be avoid if putting /FORCE:MULTIPLE into build options.
Right click on project -> Properties -> Linker -> Command Line -> Additional Options -> add /FORCE:MULTIPLE

(It just a first-add, please see the first reference for root cause.)


Reference:
http://stackoverflow.com/questions/10046485/error-lnk2005-already-defined
http://bbs.csdn.net/topics/260087335

沒有留言:

張貼留言