Adding #pragma make_public(Type) not removing C3767 error

前端 未结 1 1787
粉色の甜心
粉色の甜心 2021-01-25 14:42

I have an Assembly(A) which defines a Managed class which has a public constructor that takes two native types.

I have access to the Header files and compiled lib files

相关标签:
1条回答
  • 2021-01-25 15:38

    make_public will make the the native type visibile to consumers of the assembly where you use it: http://msdn.microsoft.com/en-us/library/ms235607(v=vs.80).aspx. It will not change the visibility in an assembly you reference.

    It seems the assembly you referenced should have had either a make_public for the native type, or simply declared the native type public (see Type visibilty for a header Share a header file shared between native and managed clients).

    The below page seems to indicate that they should have gotten a warning for writing the method without making the native types public: http://msdn.microsoft.com/en-us/library/ms173713(v=vs.80).aspx

    Perhaps you could post the third-party AssemblyAType code to make sure there's nothing else we're missing.

    0 讨论(0)
提交回复
热议问题