Intellisense Search Path Request

Sysprogs forums Forums VisualGDB Intellisense Search Path Request

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #23999
    aronrubin
    Participant

    I use VGDB with CMake and MSYS2/MinGW64. I have to enter the compiler implicit header paths in the “Intellisense Settings” -> “Additional header search directories” for each new project. This is an inconvenience for me but others might not know how to find the paths. The following is how eclipse used to find it automatically:

    echo | gcc -xc++ -Wp,-v -E –

    It also used the following for defines (I think you already have that covered):

    echo | gcc -xc++ -Wp,-dM -E –

    Obviously this would be compiler and language specific. In a CMake world the values are reported in:

    CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES
    CMAKE_<LANG>_STANDARD_INCLUDE_DIRECTORIES

    Thank you

    #24003
    support
    Keymaster

    Hi,

    VisualGDB also queries the explicit/implicit directories from gcc. Depending on your project type, this is done during the toolchain testing or during the project load.

    If you believe it is not working, please let us know your project type (i.e. whether you are using Advanced CMake and whether the project is built on the Windows or Linux machine) and we will help you get it to work.

    #24014
    aronrubin
    Participant

    Sorry I made some bad assumptions. Looking into this more I believe the problem relates to stale cached values after the compiler is upgraded. i.e. MingW64 gcc went from 8.2.1 to 8.3.0 just a few days ago. After removing the VisualGDBCache directory and letting it reconstitute the manual entries are no longer needed.

    #24015
    support
    Keymaster

    No worries. For CMake projects the implicit toolchain directories are indeed cached in the VisualGDBCache directory, although they should get invalidated when the gcc executable changed. The only exception would be if you changed gcc via your own CMake scripts (not maintained by VisualGDB), but kept the old toolchain in the VisualGDB settings.

    #24018
    aronrubin
    Participant

    After I notice gcc or clang being updated by the MSYS2 (pacman) the process has been to exit VS, edit the toolchain xml file to reflect the new values, and then reopen VS. For each solution that I open VGDB pops up a dialog notifying of the change and asking which direction to apply a fix. It seems I have to delete VisualGDBCache in addition to that process.

    #24019
    support
    Keymaster

    Thanks for clarifying this. If the physical path to the gcc executable remained the same, indeed VisualGDB would keep the old cached values.

    Either way, it is recommended to do a full rebuild of your project after changing the gcc executable to ensure that the object files produced by the old and the new toolchains won’t get mixed and this process will also clear out the VisualGDB cache.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.