赞
踩
代码能正常运行,但是在mac下的vscode中,一旦使用错误提示,会爆满各种无法找到stl源文件的提示,一度以为是各种includepath的问题,其实解决方案没那么复杂,因为我的代码是用mpicxx编译的,但是在这里编译器还是选择"compilerPath": "/usr/bin/clang"就好了,不要去用mpicxx的路径。参考如下c_cpp_properties.json
- {
- "configurations": [
- {
- "name": "Mac",
- "includePath": [
- "${workspaceFolder}/**",
- "/Volumes/algo/libmesh/libmesh/install_dir/include/**",
- "/Volumes/algo/petsc/petsc-v3.19.0/include",
- "/Volumes/algo/petsc/petsc-v3.19.0/default/include",
- "/Volumes/algo/libmesh/twophase/include"
- ],
- "defines": [],
- "macFrameworkPath": [
- "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks"
- ],
- "compilerPath": "/usr/bin/clang",
- "cStandard": "c17",
- "cppStandard": "c++20"
- }
- ],
- "version": 4
- }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。