Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. C4005: 'AF_IPX' : macro redefinition
Qt 6.12 LTS is out! See what's new in the release blog

C4005: 'AF_IPX' : macro redefinition

Scheduled Pinned Locked Moved Unsolved General and Desktop
13 Posts 3 Posters 3.3k Views 1 Watching
  • 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.
  • SPlattenS SPlatten

    @jsulm , sorry, I'm compiling on Windows 10 using Qt Creator and Qt 5.8, the compile is Microsoft I have a couple of versions installed, MSVC 2013 and 2017, I think its using 2013.

    Its a large project which I'm converting from Qt 4.8 to Qt 5.8. Hope that helps?

    jsulmJ Offline
    jsulmJ Offline
    jsulm
    Lifetime Qt Champion
    wrote on last edited by
    #4

    @SPlatten Where in your project does the error come from? I mean from which source/header file.

    https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    0
    • SPlattenS Offline
      SPlattenS Offline
      SPlatten
      wrote on last edited by
      #5

      It seems to come from several files all of which are specific to this project. The problem seems to be moving and changing as I fix one thing another results...see edit which I'm about to do...

      Kind Regards,
      Sy

      jsulmJ 1 Reply Last reply
      0
      • SPlattenS SPlatten

        It seems to come from several files all of which are specific to this project. The problem seems to be moving and changing as I fix one thing another results...see edit which I'm about to do...

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #6

        @SPlatten Could it be related to missing include guards: https://stackoverflow.com/questions/1372480/c-redefinition-header-files-winsock2-h ?

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        SPlattenS 1 Reply Last reply
        0
        • jsulmJ jsulm

          @SPlatten Could it be related to missing include guards: https://stackoverflow.com/questions/1372480/c-redefinition-header-files-winsock2-h ?

          SPlattenS Offline
          SPlattenS Offline
          SPlatten
          wrote on last edited by
          #7

          @jsulm I do have guards in the headers, I always start off with:

          #ifndef WIN_H // or whatever I call it
              #define WIN_H
          
          //Content of header
          
          
          
          #endif
          

          Kind Regards,
          Sy

          1 Reply Last reply
          0
          • SPlattenS Offline
            SPlattenS Offline
            SPlatten
            wrote on last edited by
            #8

            So after my last edit, the problem has changed now I get:

            C2146: syntax error: missing ';' before identifier 'IWbemClassObject'
            

            Kind Regards,
            Sy

            jsulmJ 1 Reply Last reply
            0
            • SPlattenS SPlatten

              So after my last edit, the problem has changed now I get:

              C2146: syntax error: missing ';' before identifier 'IWbemClassObject'
              
              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #9

              @SPlatten Without seeing the code...

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • SPlattenS Offline
                SPlattenS Offline
                SPlatten
                wrote on last edited by
                #10

                @jsulm , sorry its difficult because there is a lot of it.

                Kind Regards,
                Sy

                1 Reply Last reply
                0
                • Christian EhrlicherC Offline
                  Christian EhrlicherC Offline
                  Christian Ehrlicher
                  Lifetime Qt Champion
                  wrote on last edited by
                  #11

                  I wonder what's Qt related here but you're missing a semicolon at the end of a class (mostly the class from the last include before IWbemClassObject)

                  Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                  Visit the Qt Academy at https://academy.qt.io/catalog

                  1 Reply Last reply
                  0
                  • SPlattenS Offline
                    SPlattenS Offline
                    SPlatten
                    wrote on last edited by
                    #12

                    The whole project is Qt related, granted particular error might not be, I'm just trying to get some assistance. The header that IWbemClassObject is defined in is a Microsoft header, and its path is:

                        C:\Program Files (x86)\Windows Kits\8.1\Include\um\WbemCli.h
                    

                    I've looked at the header and it is a typical error message that has nothing to do with the issue. The line line has the error on it is:

                        typedef interface IWbemClassObject IWbemClassObject;
                    

                    Kind Regards,
                    Sy

                    1 Reply Last reply
                    0
                    • Christian EhrlicherC Offline
                      Christian EhrlicherC Offline
                      Christian Ehrlicher
                      Lifetime Qt Champion
                      wrote on last edited by
                      #13

                      The solution is as always - either give a compilable example or reduce your code until the error goes away.

                      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                      Visit the Qt Academy at https://academy.qt.io/catalog

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt
                      • Unsolved