Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. #define _WIN32_WINT 0x0500
Forum Updated to NodeBB v4.3 + New Features

#define _WIN32_WINT 0x0500

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
5 Posts 3 Posters 777 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.
  • M Offline
    M Offline
    Madesh R
    wrote on last edited by
    #1

    Hi All,

    To include windows.h headerfile , i use a pre processing directive #define _WIN32_WINT 0x0500 ,
    Can someone let me know what is the equivalent directive for the linux systems/ mac.

    I'am declaring the above pre preocessor before including windows.h ,in main.cpp
    Is it a right place or should I specify such token's inside the pro file? If so what should I define so that it works well with windows,mac and LInux based machines.

    aha_1980A 1 Reply Last reply
    0
    • M Madesh R

      Hi All,

      To include windows.h headerfile , i use a pre processing directive #define _WIN32_WINT 0x0500 ,
      Can someone let me know what is the equivalent directive for the linux systems/ mac.

      I'am declaring the above pre preocessor before including windows.h ,in main.cpp
      Is it a right place or should I specify such token's inside the pro file? If so what should I define so that it works well with windows,mac and LInux based machines.

      aha_1980A Offline
      aha_1980A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Madesh-R

      Why do you include Windows.h at all? On Linux and mac, there is no Windows.h. So if you need stuff from the Windows API, you'll have to rewrite it for the other platforms.

      But probably there's already something in Qt that could help you?

      Qt has to stay free or it will die.

      M 1 Reply Last reply
      3
      • dheerendraD Offline
        dheerendraD Offline
        dheerendra
        Qt Champions 2022
        wrote on last edited by
        #3

        Assuming that you are using in Qt did you look at the Qt directives like ?
        Q_OS_WIN,
        Q_OS_LINUX

        Dheerendra
        @Community Service
        Certified Qt Specialist
        http://www.pthinks.com

        M 1 Reply Last reply
        3
        • aha_1980A aha_1980

          @Madesh-R

          Why do you include Windows.h at all? On Linux and mac, there is no Windows.h. So if you need stuff from the Windows API, you'll have to rewrite it for the other platforms.

          But probably there's already something in Qt that could help you?

          M Offline
          M Offline
          Madesh R
          wrote on last edited by
          #4

          @aha_1980
          Hi,
          Thanks for the reply .
          I included windows.h to access window(Like a non console window) functionality.

          1 Reply Last reply
          0
          • dheerendraD dheerendra

            Assuming that you are using in Qt did you look at the Qt directives like ?
            Q_OS_WIN,
            Q_OS_LINUX

            M Offline
            M Offline
            Madesh R
            wrote on last edited by
            #5

            @dheerendra

            Hi,
            Thanks for the reply.
            I will surely look into it.

            Thanks

            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 Extensions
            • Unsolved