提问人:ikol 提问时间:10/24/2023 最后编辑:the busybeeikol 更新时间:10/25/2023 访问量:33
Mac 上的 VSCode arm64 似乎无法识别 includePath 中的符号链接
VSCode on Mac arm64 doesn't seem to recognize symlinks in includePath
问:
我正在尝试使用 VSCode 编译/调试 C 程序,我打算将其从 Linux 移植到 MacOS (Mac Studio)。该程序使用我随自制软件一起安装的 arb 任意精度库。我的程序使用 2 个包含文件
#include "acb.h"
#include "flint/profiler.h"
驻留在目录中。当我第一次调试文件时,我收到一条错误消息,指示未找到这些包含文件。我执行“快速修复”并在c_cpp_properties.json文件中编辑 includePath,向 includePath 添加一行。/opt/homebrew/include
"configurations": [
{
"name": "Mac",
"includePath": [
"${workspaceFolder}/**",
"/opt/homebrew/include/**"
],
但是,我仍然收到错误消息“acb.h”文件未找到。
中的所有包含文件都是指向不同位置的符号链接,但我认为这无关紧要,我在命令行上编译程序没有任何问题。我也尝试了includePath,但无济于事。事实上,我可以让 VSCode 找到我的包含文件的唯一方法是给出它们的绝对路径,但即便如此,VSCode 也找不到 acb.h 或 flint/profiler.h 中引用的任何包含文件。/opt/homebrew/include
/opt/homebrew/Cellar
-I/opt/homebrew/include
"/opt/homebrew/Cellar/**"
非常感谢您的任何建议。
答:
0赞
ikol
10/25/2023
#1
将我所有的命令行参数添加到 tasks.json 中的 args 列表解决了这个问题。
评论
foo
的父目录添加到列表中。**
**
foo/bar/qux.h