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

相关推荐
系'辞1 小时前
【obsidian指南】配置obsidian git插件,实现obsidian数据定时同步到github仓库(Mac电脑)
macos·github·agent·知识库
栗子叶15 小时前
IP协议 地址划分&MAC地址作用&ip addr命令
网络·tcp/ip·macos
choumin16 小时前
在 Debian 上安装并运行 PoCL
linux·编译·安装·pocl
draking19 小时前
Anthropic 封杀当天,我把 OpenCode 升到 1.1.11,踩了 5 个坑
macos·ai编程
Roye_ack20 小时前
【Mac环境配置教程】深度学习环境配置(Anaconda + PyTorch)
macos
程序员雄杰21 小时前
腾讯云轻量应用服务器mac中ssh免密登录到服务器
macos·ssh·腾讯云
YongPagani2 天前
Mac安装Homebrew
macos
Byron Loong2 天前
【系统】Mac系统和Linux 指令对比
linux·macos·策略模式
软件小滔2 天前
拖拽出来的专业感
经验分享·macos·mac·应用推荐
coooliang2 天前
Macos下载元神 ipa文件
macos