Mac M1芯片环境下VSCode与g++无法找到QuantLib头文件求助
Mac M1芯片下QuantLib头文件无法定位问题
问题情况
已在Mac M1芯片上成功安装QuantLib,但VSCode与g++均无法定位QuantLib头文件,怀疑与硅芯片架构相关。
已尝试的解决操作
- 在
c_cpp_properties.json中添加include路径:/opt/homebrew/Cellar/quantlib/1.28/include、/opt/homebrew/Cellar/boost/1.80.0/include - 在
.zshrc文件中添加环境变量:
export CPLUS_INCLUDE_PATH=/opt/homebrew/include export C_INCLUDE_PATH=/opt/homebrew/include export CPATH=/opt/homebrew/include export LIBRARY_PATH=/opt/homebrew/lib
当前报错信息
test.cpp:3:10: fatal error: 'ql/quantlib.hpp' file not found
现有c_cpp_properties.json配置
{ "configurations": [ { "name": "Mac", "includePath": [ "${workspaceFolder}", "/opt/homebrew/Cellar/quantlib/1.28/include", "/opt/homebrew/Cellar/boost/1.80.0/include" ], "defines": [], "macFrameworkPath": [ "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks" ], "compilerPath": "/usr/bin/clang", "cStandard": "c17", "cppStandard": "c++17", "intelliSenseMode": "macos-clang-arm64" } ], "version": 4 }
内容的提问来源于stack exchange,提问作者ceejam
相关产品推荐
相关产品推荐

