DEBUG defined in gcc_Debug.h?

Sysprogs forums Forums VisualGDB DEBUG defined in gcc_Debug.h?

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #10882
    thedixon
    Participant

    Hi,

    Why is DEBUG defined in gcc_Debug.h? Seems like it isn’t part of standard gcc defines, we have a following piece of code:

    enum Level {
    DEBUG = 8,
    FIX = 9
    };

    and it compiles just fine with gcc. clang intellisense is complaining though on that DEBUG line.

     

    #10884
    support
    Keymaster

    Hi,

    It is defined there because VisualGDB normally defines the DEBUG macro for the debug configurations to distinguish them from release ones.

    You can simply remove it from the “preprocessor macros” field via VisualGDB Project Properties and click “Apply” to regenerate the gcc_Debug.h file automatically.

    #10885
    thedixon
    Participant

    I’m also seemingly unable to get rid of that define. I deleted DEBUG defines from all gcc_Debug.h that I could find, and intellisense still thinks it’s defined.

    #10886
    thedixon
    Participant

    Ah, replied without noticing your reply. Where is “preprocessor macros” field in the VisualGDB Project properties? I’m unable to find it for some reason. I’m using “custom build” type if it’s relevant

    #10902
    support
    Keymaster

    Hi,

    For custom build, VisualGDB would actually expect you to configure IntelliSense manually. Hence manually editing the gcc_Debug.h file would be the recommended option.

    If it does not help, please try using the ‘Go to definition’ command to locate the macro definition. Also please double-check that you are using the Clang IntelliSense engine and not the native VS one.

    #10931
    thedixon
    Participant

    Hmm, it started to work at some point (I didn’t notice when). I had deleted CodeDB meanwhile, could it be it?

    #10933
    support
    Keymaster

    Hi,

    Hard so say what could cause that, but good to know it works. If you encounter the problem again, feel free to reopen this topic.

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