Search code examples
linuxcmakefedoracgalcmake-gui

qtCreator, couln't find the execuable


After Compiling CGAL on fedora 27, I'm trying to run a CGAL example to test that it is work correctly .

*I opened CGAL-4.11/examples/triangulation/CMakeLists.txt using QTCreator. but it shows the following dialog: couln't find the execuable

I appreciate help , thanks


Solution

  • You should check in QTCreator, in the section Projects->Run that the selected executable corresponds to the test you built.You can also check the output of CMake at the bottom of the window, in the section General Messages, if something went wrong when parsing the project, like a misisng dependency for example.

    EDIT: I'm realizing you said nothing about building the example. I know QtCreator to be sometimes hard to use with CMake. I'd say follow these steps : 1/ Projects->Manage Kits->(whatever kit you want to use, probably the default one) on the line CMake Configuration, click "change" on the right -> Add At least the following line : CGAL_DIR:PATH=path_to_cgal (root if you are in header only, since CGAL 4.12 IIRC, build dir else) ->OK->OK. 2/Choose this kit in the list in the Project tab and configure the path you want to your build dir for the example 3/ In the Edit tab, right click on your project and click on "execute CMake" 4/Back in Projects, choose the target you want in "Build steps" and build it (Ctrl+B) 5/ in Projects->Run choose the corresponding target and hit ctrl+R.

    I find it way easier to do all this by shell. Just call cmake -DCGAL_DIR= and then build and run.