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

后端 未结 5 736
悲&欢浪女
悲&欢浪女 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:48

    Had the same issue upgrading from VS2008 to VS2012. An alternative solution to the hotfix for me was to move the

    #pragma make_public( ClassName )
    

    statement from the .cpp file where it was up to now to stdafx.h.

提交回复
热议问题