C/C++ mix intellisense broken

Sysprogs forums Forums VisualGDB C/C++ mix intellisense broken

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #28078
    isigor
    Participant

    I’m working on project which mixes C/C++ files

    I have noticed that intellisense is broken in the following way:

    having “main.c” to be compiled as C++ which includes “header.h”

    “header.h” are driver libs from manufacturer which contains extern “C” to support C and C++ compilation

    this compiles with no errors, but  intellisense is not recognized extern “C” that way, it errors “[Clang InteliSense] Error: expected identifier or ‘C’

    which means this header file recognized as C++ header file but InteliSense doesn’t think that.

    Inside this header there is a simple function called XXX which not recognized by InteliSense in main.c [Clang InteliSense] Warning: implicit declartion of function ‘XXX’ is invalid in C99

    If I set “main.c” as C it solves InteliSense recognition problem but it won’t compile, because main.c also includes other C++ header which contain classes, therefore it needed to be compiled as C++.

    I have attached simple project which describes the problem

    I hope you could help me solve with this issue, working InteliSense with C/C++ mix is a must for me

    Best regards

    Igor

     

    #28079
    isigor
    Participant

    Attached files

    Attachments:
    You must be logged in to view attached files.
    #28089
    support
    Keymaster

    Hi,

    No problem, we have updated VisualGDB’s IntelliSense engine to properly handle the “-x c++” flag for .c file in MSBuild projects. Please try this build: VisualGDB-5.5.5.3602.msi

    Please make sure you delete the CodeDB folder before you open the solution, as it would contain cached settings from the previous version.

    #28093
    isigor
    Participant

    Thanks for quick response

    Is works now 🙂

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