#!/bin/bash # 系统里有一个隐藏的错误设置 不然不需要在这里手动设置动态库的地址 export DYLD_LIBRARY_PATH=/usr/local/lib:$DYLD_LIBRARY_PATH #g++ gaussian2d.cpp -o gaussian2d -lgctl -lnetcdfcxx_legacy -std=c++17 -I/opt/homebrew/include ./gaussian2d gauss_model.txt