4

I am trying to wrap a C++ library which depends on libigl and Eigen in order to use it in C#. This requires a CRL wrapper class.

When compiling the wrapper, I get the following error:

error C1189: #error :  <thread> is not supported when compiling with /clr or /clr:pure. 

I understand this is a managed vs unmanaged compilation type of problem.

''thread'' is not used in my class but deeper in the Libigl stack.

Is there a workaround for this problem?

Community
  • 1
  • 1
Nic
  • 1,262
  • 2
  • 22
  • 42
  • Uncheck /clr option in compiler (compatibility mode). – jdweng Jun 01 '16 at 16:23
  • Hi @jdweng, thanks for your reply. I set "No Common Language RunTime Support" in WrapperProject-->Property-->C/C++-->General---> Common Language Runtime Support and got a bunch of other errors : C2871, C2653, C2337 – Nic Jun 01 '16 at 16:47
  • Well your aren't getting the /clr error any more. On one project this year it took me a week to go from VS2010 to VS2013 and get all the options set correctly where the code was running fine on VS2010. I had three different vendors dll in the project. Don't give up. Make sure you are using C-language rather than the default window option for passing parameters from c++ to c#. It took me a while in VS2010 to get the parameters type correct. I had to modify vendor c++ source code to change parameter type. – jdweng Jun 01 '16 at 17:19

0 Answers0