Mac Xcode and Qt IDE

Issue #282 resolved
Ilia Iliushin created an issue

Hello everyone,
Sorry for i use yours forum to solve my stupid problem.
I’m new in geant4 and programming. I installed Geant4 with this guide http://www.pp.rhul.ac.uk/bdsim/manual-develop/installation.html
I used macbook

But i have the problem. I don’t understand how use Xcode or Qt like IDE for write my own program. I think that qt and xcode didn’t see the geant4 libraries.
Previous I have installed Geant4 for another computer with centOS and i used scripts for Qt
#!/bin/bash
source /home/user/Geant4/geant4.10.05-build/geant4make.sh
/home/user/Qt/Tools/QtCreator/bin/qtcreator.sh
But on mac i don’t understand what to do. I will be grateful to any help.
I searched the answers on forums but hadn’t found information.

Xcode open example on like text editor
Qt error
/Users/ilia_iliushin/Physic/geant4.10.06/examples/basic/B1/CMakeLists.txt:14: error: By not providing "FindGeant4.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Geant4", but CMake did not find one. Could not find a package configuration file provided by "Geant4" with any of the following names: Geant4Config.cmake geant4-config.cmake Add the installation prefix of "Geant4" to CMAKE_PREFIX_PATH or set "Geant4_DIR" to a directory containing one of the above files. If "Geant4" provides a separate development package or SDK, be sure it has been installed.

Qt log

Project ERROR: You need to set the ANDROID_NDK_ROOT environment variable to point to your Android NDK.

Could not read qmake configuration file /Applications/Qt/5.14.1/android/mkspecs/android-clang/qmake.conf.

Работа /Applications/Qt/Tools/CMake/CMake.app/Contents/bin/cmake /Users/ilia_iliushin/Physic/geant4.10.06-install/share/Geant4-10.6.0/examples/basic/B1 '-GCodeBlocks - Unix Makefiles' -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_CXX_COMPILER:STRING=/usr/bin/clang++ -DCMAKE_C_COMPILER:STRING=/usr/bin/clang -DCMAKE_PREFIX_PATH:STRING=/Applications/Qt/5.14.1/clang_64 -DQT_QMAKE_EXECUTABLE:STRING=/Applications/Qt/5.14.1/clang_64/bin/qmake на /private/var/folders/8f/y_nbnxgd5034j99_9db8gx0m0000gn/T/QtCreator-sAcbac/qtc-cmake-rslVKrpa.

    • The C compiler identification is AppleClang 11.0.0.11000033
    • The CXX compiler identification is AppleClang 11.0.0.11000033
    • Check for working C compiler: /usr/bin/clang
    • Check for working C compiler: /usr/bin/clang -- works
    • Detecting C compiler ABI info
    • Detecting C compiler ABI info - done
    • Detecting C compile features
    • Detecting C compile features - done
    • Check for working CXX compiler: /usr/bin/clang++
    • Check for working CXX compiler: /usr/bin/clang++ -- works
    • Detecting CXX compiler ABI info
    • Detecting CXX compiler ABI info - done
    • Detecting CXX compile features
    • Detecting CXX compile features - done

CMake Error at CMakeLists.txt:14 (find_package):

By not providing "FindGeant4.cmake" in CMAKE_MODULE_PATH this project has

asked CMake to find a package configuration file provided by "Geant4", but

CMake did not find one.

Could not find a package configuration file provided by "Geant4" with any

of the following names:

Geant4Config.cmake

geant4-config.cmake

Add the installation prefix of "Geant4" to CMAKE_PREFIX_PATH or set

"Geant4_DIR" to a directory containing one of the above files. If "Geant4"

provides a separate development package or SDK, be sure it has been

installed.

    • Configuring incomplete, errors occurred!

See also "/private/var/folders/8f/y_nbnxgd5034j99_9db8gx0m0000gn/T/QtCreator-sAcbac/qtc-cmake-rslVKrpa/CMakeFiles/CMakeOutput.log".

Comments (2)

  1. Laurie Nevay

    Dear Ilia,

    BDSIM is an application based on the Geant4 to make models of accelerator and not a general Geant4 interface or guide. The part in our manual about Geant4 is just to help set it up as we required specific Geant4 options to be used for our application.

    I suggest having a look at the Geant4 forum or posting a question there - they give good feedback and help.

    https://geant4-forum.web.cern.ch

    Also their manual has a guide about making a program using Geant4.

    http://geant4-userdoc.web.cern.ch/geant4-userdoc/UsersGuides/ForApplicationDeveloper/html/GettingStarted/makeFile.html#building-exampleb1-with-cmake-on-unix-with-makefiles

    http://geant4-userdoc.web.cern.ch/geant4-userdoc/UsersGuides/ForApplicationDeveloper/html/GettingStarted/makeFile.html#using-cmake-to-build-applications

    One thing I noticed from your print out is that you should source <geant4-install-dir>/bin/geant4.sh -> you seem to be sourcing it from the build directory.

    Cheers,
    Laurie

  2. Log in to comment