<div dir="ltr">All,<div><br></div><div>I recently upgraded to CMake 3.8 to get support for C# as a first class language and it works nicely. However, I am seeking clarification on something:</div><div><br></div><div>I currently compile my C++/CLI wrapper as a SHARED lib. This produces a linking lib which I didn't expect and don't want (using the lib works fine in my build with no issues). After reading the docs (<a href="https://cmake.org/cmake/help/v3.8/command/add_library.html">https://cmake.org/cmake/help/v3.8/command/add_library.html</a>), it seems like I should be compiling the lib as a MODULE since I do not want unmanaged symbols exported.</div><div><br></div><div>However, when I change to MODULE and try to link that to a C# console app, it doesn't work anymore, I get the "MODULE_LIBRARY may not be linked into another target".</div><div><br></div><div>My question: am I doing something wrong here? What is the standard way to build a C++/CLI lib and link it to a C# app?</div><div><br></div><div>Some things to note:</div><div><ul><li>When I link to the C# app, I use target_link_libraries, I don't put it as a reference. I was hoping I could just use this macro and not have to explicitly place it as a reference.</li><li>My C++/CLI wrapper lib does have some public C symbols which I believe is causing the linking lib to be created so I will investigate that. However, that doesn't answer the question of how to correctly compile a C++/CLI lib.</li></ul></div><div><div>If there isn't a simple answer, I can create a SSCCE (<a href="http://sscce.org/">http://sscce.org/</a>) to replicate the issue I am having.</div><div><br></div><div>Thanks!</div>Caleb</div></div>