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,编译例子,并执行

相关推荐
pe7er3 天前
macOS 应用无法打开(权限问题)解决方案
macos·mac
harmful_sheep6 天前
mac生效的终端查看
macos
iOS门童6 天前
macOS 应用"已损坏"无法打开?一文搞懂 Gatekeeper 与解决方案
macos
NPE~6 天前
[工具分享]Maccy —— 优雅的 macOS 剪贴板历史管理工具
macos·教程·工具·实用工具
差不多程序员6 天前
Mac安装OpenClaw-cn保姆级教程
macos
dzl843946 天前
mac 安装python
开发语言·python·macos
Bruce_Liuxiaowei7 天前
在 macOS 上通过 Docker 本地安装 OpenClaw 完整教程
macos·docker·容器·openclaw
阿捏利7 天前
详解Mach-O(十五)Mach-O __DATA_CONST
macos·ios·c/c++·mach-o
ShikiSuen7 天前
macOS 的 CpLk 中英切换卡顿的元凶在 InputMethodKit 本身
macos
xiayutian_c7 天前
如虎添翼-MacOS
macos