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

相关推荐
Piink27 分钟前
Mac使用Vscode教程
ide·vscode·macos
福大大架构师每日一题2 小时前
rust 1.99.1 正式更新:聚焦 UEFI、嵌入式、x86_64 FFI 与 macOS 链接体验的三项修复
开发语言·macos·rust
雪域迷影2 小时前
MacOS中杀掉某个端口占用的进程
macos·端口·强杀进程
ManageEngine卓豪15 小时前
企业 Mac终端如何统一管控?配置、补丁与应用的落地框架
macos·mdm·uem·终端管理系统
黑化旺仔20 小时前
【OC】Runtime:类元数据、加载初始化与消息派发
开发语言·macos·ios·objective-c
Web3&Basketball2 天前
Meta Muse 816B 实测:两台 Mac 本地跑通
macos·大模型·mac·本地部署·moe·显存优化·meta muse
DevLoom_2 天前
macOS 27 升级翻车怎么降级?不用终端,2 种方案实测回退旧系统
macos·macos27·mac系统降级·macos安装盘·mac使用技巧
向着光芒的女孩2 天前
【Mac】腾讯视频会议在Mac电脑屏幕共享失败解决方案
macos
あ-3 天前
mac dbeaver安装后显示数据包损坏
macos
钱栈up3 天前
从 macOS 切回 Windows,我用 5 个免费工具把 80% 操作习惯搬了回来
windows·macos·策略模式