Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. __cplusplus is still defined in MinGW 32-bit C compiler
Forum Updated to NodeBB v4.3 + New Features

__cplusplus is still defined in MinGW 32-bit C compiler

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 480 Views
  • 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 Offline
    J Offline
    JonSchell
    wrote on 16 Jul 2018, 02:03 last edited by
    #1

    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?

    A 1 Reply Last reply 16 Jul 2018, 03:57
    0
    • J JonSchell
      16 Jul 2018, 02:03

      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?

      A Offline
      A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on 16 Jul 2018, 03:57 last edited by
      #2

      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
      1

      1/2

      16 Jul 2018, 02:03

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved