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. Problem with windows.h and DWORD type
Forum Updated to NodeBB v4.3 + New Features

Problem with windows.h and DWORD type

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 5.2k 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.
  • D Offline
    D Offline
    Damalo_02
    wrote on last edited by Damalo_02
    #1

    Hello,
    I'm new to Qt, and I need to use DWORD type for a project.
    To start I have added this line in my .pro : (this path corresponds to where the windows.h file is located)
    0_1552054010103_340a1cbe-6850-41a2-aa06-8b4757e7cdc3-image.png
    And I have included windows.h in my header file
    0_1552053878221_504082ef-1165-41ae-b707-1017692b306c-image.png

    But I still get this error in my header file (and in my source file) unknown type name DWORD :
    0_1552054323339_7835ef27-5e64-442c-bbd7-ac1de0d149ba-image.png

    If someone can help me pls

    J.HilkJ 1 Reply Last reply
    0
    • D Damalo_02

      Hello,
      I'm new to Qt, and I need to use DWORD type for a project.
      To start I have added this line in my .pro : (this path corresponds to where the windows.h file is located)
      0_1552054010103_340a1cbe-6850-41a2-aa06-8b4757e7cdc3-image.png
      And I have included windows.h in my header file
      0_1552053878221_504082ef-1165-41ae-b707-1017692b306c-image.png

      But I still get this error in my header file (and in my source file) unknown type name DWORD :
      0_1552054323339_7835ef27-5e64-442c-bbd7-ac1de0d149ba-image.png

      If someone can help me pls

      J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by J.Hilk
      #2

      Hi @Damalo_02

      let me ask a few questions.

      1. Are you actually also using the mingw compiler kit for your application?
        Because there will be conflicts if you add the mingw windows.h to your include path and you're using MSVC compiler.

      2. you shouldn't need to add the include path to simply use windows.h. that should be done automatically. So why did you do it

      3. You have to do a complete rebuild of your project, when you change anything in your *pro file. -> Delete your build folder.


      Edit: fixed format


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      1 Reply Last reply
      3
      • D Offline
        D Offline
        Damalo_02
        wrote on last edited by
        #3

        Yes I use mingw as compiler.

        Thanks a lot for your help, I solved the problem. I just installed Visual Studio 2017, created a new Qt project, and everything works fine now.

        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