CFLAGS and CXXFLAGS

Sysprogs forums Forums VisualGDB CFLAGS and CXXFLAGS

Tagged: , ,

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #36798
    Alaa137
    Participant

    I have a C project in VisualGDB, and now I’m adding some cpp files, so I need to add the flag -std=c++11 under CXXFLAGS , but I can’t find that option under VisualGDB Project Properties. I saw in other posts that you recommend usingĀ Additional Options (C++ files) under project properties > Configuration properties > C/C++ > Advanced. Should I just add the flag there? I need separate flags for C and C++.

    Thanks

    #36799
    support
    Keymaster

    Hi,

    You can do that, but it could be easier to use the dedicated “Language Standard” setting. The exact name depends on the project type, but it would also be under Project Properties -> C/C++ -> Advanced.

    #36800
    Alaa137
    Participant

    Thanks for the response. I have “Language Standard for C files” and “Language Standard for C++ files”. I specified c11 and c++11 respectively and tried to compile, but I’m getting this error:

    unknown type name ‘class’

    Do you know what could be causing the issue?

    I’m using VisualGDB 6.0R6 (build 5262) along with Linaro 4.9.4

     

    #36801
    support
    Keymaster

    Sorry, that’s for you to figure out. Probably broken code somewhere.

    #36802
    Alaa137
    Participant

    Thanks, I had to wrap a function with extern "C", it’s working now.

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