MacOS Sequoia安装geant4.10.07

1,安装Geant4需求环境

(1,)安装xcode,在~/.bash_profile中添加其环境变量

export PATH="/Applications/CMake.app/Contents/bin":"$PATH"

(2,)brew install clhep

(3,)brew install cmake

(4,)brew install qt5

(5,)brew install xerces-c

2,配置qt5环境变量

在~/.bash_profile中添加如下几行

export PATH="/usr/local/opt/qt@5/bin:$PATH"

export LDFLAGS="-L/usr/local/opt/qt@5/lib":$LDFLAGS

export CPPFLAGS="-I/usr/local/opt/qt@5/include":$CPPFLAGS

export PKG_CONFIG_PATH="/usr/local/opt/qt@5/lib/pkgconfig":$PKG_CONFIG_PATH

3,下载Geant4源码并解压

4,新建build及install文件夹,build及install文件夹与源码文件夹在同一目录层次

5,cd 到build文件夹,运行如下命令:

cmake -DCMAKE_INSTALL_PREFIX=/Users/***/geant4/geant4.10.07_install -DCMAKE_BUILD_TYPE=RelWithDebInfo -DGEANT4_USE_GDML=ON -DGEANT4_BUILD_MULTITHREADED=ON -DXERCESC_ROOT_DIR=/user/local/opt/xerces-c/ -DGEANT4_USE_QT=ON -DGEANT4_INSTALL_EXAMPLES=ON -DGEANT4_INSTALL_DATA=ON -DGEANT4_USE_SYSTEM_EXPAT=OFF -DGEANT4_BUILD_TLS_MODEL=auto ../geant4.10.07

6,再运行如下命令:

cmake --build . --target install -- -j8

7,sourc geant4安装目录bin下的geant4.sh

8,编译例子,并执行

相关推荐
qq_4017004111 小时前
嵌入式Linux网口MAC地址修改
linux·运维·macos
天庭鸡腿哥17 小时前
无须激活,安装即是Pro版!
microsoft·macos·visual studio·everything
lingggggaaaa1 天前
CS配合CrossC2插件,实现MacOS/Linux上线
linux·运维·笔记·安全·macos
无意feel2 天前
MacOS 安装neofetch cmatrix lolcat
macos·数字雨·彩虹特效
KevinShi_BJ2 天前
MacOS 上安装 Docker 和启动 LangBot
macos
ricky_fan2 天前
(25年12月)claude code报错:might not be available in your country
macos·bash
james bid2 天前
MacBook Pro 2015 上 XUbuntu 24.04 启用 eGPU (GeForce GTX 1080 Ti) 和核显黑屏问题解决
linux·ubuntu·macos·cuda·egpu
私人珍藏库2 天前
[Mac] Mac风扇控制软件 iFan V1.1.1
macos
腾讯云qcloud07552 天前
腾讯位置商业授权iOS 轨迹SDK
macos·ios·cocoa
新手村领路人2 天前
MacOS Tahoe26.1自制定时休眠app
macos