how to ignore LNK2005 & LNK1169?

后端 未结 2 524
傲寒
傲寒 2021-01-13 07:20

So I have a Visual Studio 2010 project that uses external libraries and in order to get it compile without LNK2005 I had to juggle arround with the order of the libraries in

2条回答
  •  情书的邮戳
    2021-01-13 07:58

    You absolutely must not ignore linker errors, ever! A linker is telling you that it's confused about a symbol that's defined in multiple places - where should it take the definition from? Do you really want it to be arbitrary? What about when you change your code and the linker randomly decides to take the other definition which might suddenly break your code?

    Instead of fighting the tool, correct your code so that it compiles and links without errors. This MSDN article has some information on fixing it, along with links for more information.

提交回复
热议问题