1

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.

Mitch
  • 107,631
Null pointer
  • 2,547
  • 5
  • 26
  • 38

1 Answers1

1

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.

EDIT2:

  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.

Misery
  • 3,484
  • 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 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 using namespace std; in given template) it gave me a fatal error. – Null pointer Jun 16 '13 at 04:29
  • Well in C++ you should not use iostream.h, it is a C file not a C++ file. The question is: why CGAL (which is C++ code) wants to use C headers then. I'll try to compile CGAL in a free time, and see what happens. – Misery Jun 17 '13 at 05:44
  • Actually I did compile CGAL without grater issues. However I compiled only CGAL Core. So maybe try to begin with compiling only this part and see if that causes errors. – Misery Jun 18 '13 at 07:03
  • Thanks again for giving your time..If it works then please guide me – Null pointer Jun 20 '13 at 04:20
  • Edited an answer. Hope that helps. – Misery Jun 20 '13 at 05:57
  • Thanks misery I will try this method and will inform you soon.. – Null pointer Jun 28 '13 at 06:33