<thread> not supported


#1

I’ve run into a problem trying to include chaiscript in our system when compiling on Windows. Our product is 99% C++ but has a little .NET stuff around the edge related to license management. Any idea how to deal with this problem?

1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\thread(8): fatal error C1189: #error: is not supported when compiling with /clr or /clr:pure. (compiling source file …\Source\Scripting\ScriptEditorWindow.cpp)


#2

If you are not using a single ChaiScript engine from multiple threads simultaneously, you can just compile with

-DCHAISCRIPT_NO_THREADS

And disable ChaiScript’s threading support altogether.

If on the other hand, you somehow require threading but cannot compile with threading… I’m not sure how that would work.

-Jason


#3

When I set up that define, then I started getting these errors

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

and these errors

Error	C2664	'std::shared_ptr<chaiscript::Boxed_Value::Data> std::make_shared<chaiscript::Boxed_Value::Data,chaiscript::Type_Info,chaiscript::detail::Any,bool,nullptr,bool&>(chaiscript::Type_Info &&,chaiscript::detail::Any &&,bool &&,nullptr &&,bool &)': cannot convert argument 4 from 'nullptr' to 'nullptr &&'

#4

I hope there are some line numbers related to these errors?