Skip to content

**** ****

for my bad memories..

CGAL Build on MinGW

MinGW상에서 CGAL 빌드 방법.

1) download boost sources and compile it (I use boost 1.47.0):

a) generate b2.exe (jam) by typing in a console "bootstrap.bat mingw" 
  b) type in a console: b2.exe --prefix=<absolute_path_to_boost64> 
toolset=gcc address-model=64 variant=debug,release link=static,shared 
threading=multi install 
Before, I tried an external version of boost-jam like described here:
but bjam.exe failed to build boost.

2) build CGAL libraries (I use cgal 3.9):

  a) Use cmake-gui 
  b) before configuring, setup the BOOST_ROOT path variable to you BOOST 
  c) optional (this doesn't work for me): setup the Boost_LIBRARYDIR to 
your boost\lib dir 
  d) configure 
  e) optional: check demos and examples and configure again 
  f) generate 
  g) type in a console mingw32-make 
  h) if you have troubles with emmintrin.h and intrin.h, you must add a 
"#include <windows.h>" at the top of the file "all_files.cpp" in the 
src/ImageIO directory generated by cmake 

혹시.. double.h 파일에서 에러가 나면 다음을 추가.

#if defined ( _MSC_VER )
#define CGAL_ALIGN_16  __declspec(align(16))
#elif defined( __GNU__ ) || defined( __MINGW32__ )
#define  CGAL_ALIGN_16 __attribute__((aligned(16))) 

#ifdef CGAL_USE_SSE2_FABS   
inline double sse2fabs(double a)
  static CGAL_ALIGN_16 const union{

3) build demos and examples (if checked in cmake):

 - type mingw32-make demos 
for me, it doesn't link with boost (even with the 2)c) option), so demos 
generation failed. I didn't try examples, but I manualy compile an 
example: circulator 
I used those commands: 
g++ -c circulator_prog1.cpp -frounding-math -I../../include 
-I../../../../boost_1_47_0/mingw64/include/boost-1_47 -o circulator_prog1.o 
g++ circulator_prog1.o -L../../build/lib -lCGAL 
-L../../../../boost_1_47_0/mingw64/lib -lboost_thread-mgw44-mt-1_47 -o 
where /build is the build folder "where to build binaries" for cmake. 

Categorized as: Programming

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다

이 사이트는 스팸을 줄이는 아키스밋을 사용합니다. 댓글이 어떻게 처리되는지 알아보십시오.