开发者

VC6 linking conflict

开发者 https://www.devze.com 2022-12-24 18:04 出处:网络
I have an old c++ project compiled with VC6. I need to statically lin开发者_开发知识库k a new library to implement a new functionality.

I have an old c++ project compiled with VC6.

I need to statically lin开发者_开发知识库k a new library to implement a new functionality.

Unfortunately the new library define a symbol (i.e. _inflate) that is already defined in a previously linked static library.

Of course I cannot get rid of either library, and of course I have no access to the library's source code.

Is there a way to avoid the linker error (LNK2005)?


If you know that the two versions of _inflate are identical, or at least "compatible", then you can use the /FORCE:Multiple linker option to force it to ignore name clashes.

Of course, if it links to a version of that code that is "incompatible" in any way it could cause undefined behaviour.

0

精彩评论

暂无评论...
验证码 换一张
取 消