[CGAL, BOOST, C++, Visual Studio] Mutex is not supported when compiling with /clr or clr:pure

使用CLR專案去建置GUI並搭配CGAL的套件,出現以下訊息 :
  • [C++] Mutex is not supported when compiling with /clr or clr:pure 
目前已知原因如下 :

  • C++ / CLR在編譯時不允許使用<mutex>, <thread>, <future>, <condition_variable>。
  • CGAL編譯時所包含的Boost裡有<boost/thread/mutex.hpp>, 因此編譯器會有不兼容的問題。
解決方法目前還在想,但有一個方法可能可以試試 :
  • 將thread額外拿出來自己寫, 重新繼承? (網路上查到的, 還未確認)

留言