heliopetuous

vscode 解析 include 本地头文件和同名库文件的问题求解

  •  
  •   heliopetuous · Jul 31, 2020 · 3875 views
    This topic created in 2298 days ago, the information mentioned may be changed or developed.
    问题是这样的:
    本地 project 里有一个 assert.h,但 F12 看这个 include “assert.h”显示的 /usr/include 下的 assert.h ;
    因为本地 assert.h 里有一些自己定义的东西,vscode 总是识别不了。
    请问有人了解这个问题应该怎样解决吗?
    3 replies  •  2021-05-07 09:58:17 +08:00
    dalabenba
    dalabenba
    Jul 31, 2020 via Android
    1
    好像有 exclude 的选项吧
    heliopetuous
    heliopetuous
    OP
    Jul 31, 2020
    2
    @dalabenba 试过 files.exclude,没有效果,感觉它里面这些 exclude 都是对搜索时的结果做 filter
    Ysxcc
    Ysxcc
    May 7, 2021
    3
    c_cpp_properties.json 中设置 include 的位置,不要使用**递归搜索。或者使用 forcedInclude 直接加入你的头文件,不过这样还是会跳转到库文件,但是这样也能解决这个问题
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2063 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 13:15 · PVG 21:15 · LAX 05:15 · JFK 08:15
    ♥ Do have faith in what you're doing.