發表文章

目前顯示的是有「CGAL」標籤的文章

[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額外拿出來自己寫, 重新繼承? (網路上查到的, 還未確認)

[CGAL, CMake, Visual Studio, BOOST, Eigen] CMake 編譯 CGAL 之流程

首先需要一些事前準備的安裝軟體,如下 : Visual Studio (版本隨意,我自己是用2019,盡量不要2013) CMake (URL:  https://cmake.org/download/ ) CGAL (4.11.3, URL:  https://github.com/CGAL/cgal/releases ) EIGEN (3.2.10, URL :  http://eigen.tuxfamily.org/index.php?title=Main_Page ) BOOST (1.65.1, URL :  https://sourceforge.net/projects/boost/files/boost-binaries/1.65.1/ ) Visual C++ (14.0, MSVC140) 特別要注意的是Visual C++版本, 我直接上2019的原因就是有很多相關SDK或Framwork都比較新, 可以向下相容,比較不會有少東少西的問題, 但要注意的是MSVC版本到底是要以哪個為主, 如果是要以MSVC140,那Visual Studio 2019安裝時記得要裝MSVC140相關的套件! CMake的部分,詳細如下 :  where is the source code : CGAL路徑 where to build the binaries : CGAL路徑\build (自行建立一個build資料夾) 執行configure,選擇Visual Studio版本 執行後發現有些路徑需要設置,例如 : BOOST、EIGEN3... 設置路徑完畢後將以下打勾 BUILD_SHARED_LIBS BUILD_TESTING CGAL_DONT_OVERRIDE_CMAKE_FLAGS CGAL_ENABLE_PRECONFIG WITH_CGAL_Core WITH_CGAL_ImageIO WITH_Eigen3 WITH_GMP WITH_MPFR 執行Generate以及Open Project 選擇Debug / x64  ALL_BUILD右鍵建置 選擇Release / x64 ALL_BUI...

[CMake] 編譯CGAL時出現" Could NOT find Boost ",Error log出現 " 'pthread.h': No such file or directory "

工作編譯CGAL發生的問題, 最後檢查發現應該是CGAL版本與MSVC版本對應不一樣, boost_1_65_1-msvc-14.1-64.exe = MSVC 14 boost_1_65_1-msvc-12.0-64.exe = MSVC 12 總之就是太粗心了...要注意