I am running Ubuntu 12.04 and I want to install the CGAL library on my Desktop for my study purpose.I have tried its installation process for 1000 times(trying all different ways) but still I am unable to make it work.

This is Cmake output.

Any help is appreciated, since I am stuck on this since last two months.

Thanks in advanced.


Try sudo apt-get install libcgal*. Here is the package description.

If you really need to compile it from source I can only say that I managed to do it on Windows 7 and on Ubuntu 10.04 (havent tried on later). However it is a bit frustrating. But when it writes: fatal error: iostream.h: No such file or directory compilation terminated it simply cannot find the usual files provided with compiler so it might suggest that there's something wrong with your paths. And still CGAL is a C++ library, and iostream.h is a C file.

Try writing and running a simple C program using iostream.h file and let us know if it works.

Also be sure that you have installed all required 3rd party libs (Qt, MUMPS, LAPACk etc).

EDIT: If you need compiled version anyway, than install the packaged version for development and in the free time try to make it compile at last. After you succeed it will be enough to switch include and lib directories in your project.


  1. Install prerequisities:

    sudo apt-get install cmake cmake-gui libgmp* libboost-all-dev zlib

  2. Download CGAL

  3. Open terminal and cd to main CGAL folder (CGAL-4.2)

  4. run cmake: sudo cmake-gui

  5. check Advanced checkbox if unchecked

  6. find options that start with WITH word and uncheck all except: WITH_CGAL_Core and WITH_GMP

  7. Press Configure. Try to remove unmed dependencies or options - like OpenGL Dir not found etc. by setting proper paths and press Configure again

  8. After no errors are reported press Generate and close cmake

  9. in terminal in main CGAL folder write: make and that should give you some libs (f.ex. libCGAL_Core.so and libCGAL.so in CGAL-4.2/lib folder

  10. If that worked yoy can try to add other options and functionality. Install Qt3 and Qt4, Blas, Lapack and all the stuff required, and after each change try to build it.

| improve this answer | |
  • Thanks Misery for your help..but the problem is I can not run any c++ program by writing #include<iostream.h> I need to use #include<iostream> using namespace std; I tried doing the same thing with some of the headers of CGAL but then it gives error on some another header file ..I can not edit this thing in all header file..I also tried sudo apt-get install libcgal-dev but it didn't help..btw where can I get pre-compiled version ready to use? Thanks again.. – Null pointer Jun 14 '13 at 11:20
  • try using for example CODE::BLOCKS and use predefined C program template – Misery Jun 14 '13 at 11:25
  • sorry I didn't get you? – Null pointer Jun 14 '13 at 11:27
  • Download from Ubuntu Software Center programming environment called Code::Blocks. After you install it, create a pure C project - it will have all default settings required for linux. And try to run it. – Misery Jun 14 '13 at 11:53
  • I installed code blocks IDE and tried running the default templates of C and C++ both worked perfectly fine..But again in c++ demo when I changed header to #include<iostream.h>(which was #include<iostream> using namespace std; in given template) it gave me a fatal error. – Null pointer Jun 16 '13 at 4:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.