Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Problem with windows.h and DWORD type
Damalo_02 last edited by Damalo_02
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)
And I have included windows.h in my header file
But I still get this error in my header file (and in my source file) unknown type name DWORD :
If someone can help me pls
let me ask a few questions.
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.
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
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
Damalo_02 last edited by
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.