LNK2022 (Duplicate managed types have different visibilities) on MSVS 2012

后端 未结 5 690
悲&欢浪女
悲&欢浪女 2021-01-11 19:09

I\'m porting a solution from MSVS2005 to MSVS2012. The projects are in C++ .NET but use homemade native C++ libraires too. We had no problem building the projects with 2005

5条回答
  •  清酒与你
    2021-01-11 19:59

    I had the same problem trying to compile a VC++2013 project on a Win2008R2 machine (which compiled absolutely fine on Win8.1). Just removing any duplicate #include did not solve the problem for me.

    However, I then enabled precompiled headers and moved all make_public() statements of that project to stdafx.h, and that finally did it!

提交回复
热议问题