0

So I'm trying to install the CGAL libary so I can use it in codeblocks. However, I haven't been able to figure it out. My question is which generator should I use. I have MinGW installed and I select the "MinGW makefiles" generator when prompeted to in the cmake GUI but I get many errors, the first one being

    CMake Error: Cannot open file for write: C:/Program Files/CGAL-4.5/CMakeCache.txt.tmp
CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.0/Modules/CMakeDetermineSystem.cmake:175 (file):
  file Internal CMake error when trying to open file: C:/Program
  Files/CGAL-4.5/CMakeFiles/CMakeOutput.log for writing.
Call Stack (most recent call first):
  CMakeLists.txt:6 (project)

And I'm not totally sure what this error means. I've done a lot of research on how to fix it but I haven't seen anything that has been helpful. Any help would be appreciated. Thanks.

MonkSphere
  • 13
  • 5

2 Answers2

0

The permission system of Windows does not allow to modify files in C:/Program Files/. Even if the source of CGAL-4.5 are in C:/Program Files/, your binary directory, in CMake, should be a directory outside C:/Program Files/.

lrineau
  • 6,036
  • 3
  • 34
  • 47
0

You have to run the program with administrative rights, right click on it and select Run as Administrator.

Art C
  • 109
  • 3
  • 11