Adding intellisense to C++11 compilation

Sysprogs forums Forums VisualGDB Adding intellisense to C++11 compilation

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #625
    muzakki
    Participant

    I have added -std=c++0x to CFLAGS to enable C++11 support, and it works fine – except from intellisense.

    What I want, is to take advantage of the C++11 smart-pointers like shared_ptr and unique_ptr.

    Fx, if I do:

    std::shared_ptr ptr( new int(5) );
    there will be red squiggly lines under the new keyword.

    The compiler can’t see methods related to shared_ptr like reset:
    ptr.reset(…);

    Even though it compiles fine, its pretty annoying that intellisense is missing.
    Is it possible to add some kind of path to help intellisense?

    #2595
    support
    Keymaster

    Hi,

    Have you added the -std=c++0x flag via the VisualGDB Project Properties dialog? If no, please remove it and add again through the dialog. This will let VisualGDB re-query preprocessor definitions used by GCC and setup IntelliSense accordingly. If everything was detected correctly, your gcc_.h file in the project directory should contain the following definition:

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