Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved __cplusplus is still defined in MinGW 32-bit C compiler

    General and Desktop
    2
    2
    294
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      JonSchell last edited by

      I'm trying to add a simple GUI on top of a C library that I have. I added the source and header files directly to the project, it's not a precompiled library. But when I try to build one of the C files, I have a problem because the __cplusplus macro is still defined as 1. I have a common header file that uses STDC_VERSION and __cplusplus to figure out what standard header files to include for all my projects. When compiling a C file, __cplusplus should be 0 or undefined, not 1. I haven't had this issue in any other compiler. Is there some way to get this macro turned off?

      aha_1980 1 Reply Last reply Reply Quote 0
      • aha_1980
        aha_1980 Lifetime Qt Champion @JonSchell last edited by

        hi @JonSchell,

        • can you show us your project file for investigation?
        • is the file compiled with gcc or g++ ( compile log)?

        thanks and regards

        Qt has to stay free or it will die.

        1 Reply Last reply Reply Quote 1
        • First post
          Last post