I am unable to build and run a simple Qt 5 application,

I downloaded and installed Qt 5 on Windows 7.
I opened QtCreator 2.6.1 and created a new simple graphical application.

When I try to run it, it says:

"C: \ Qt \ Qt5.0.0 \ 5.0.0 \ msvc2010 \ include \ QtCore \ qglobal.h: 46: error: C1083: Cannot open include file: 'stddef.h: No such file or directory"

What is the problem and how can I solve it? My compiler: MSVC2010 32 bit

+3


source to share


1 answer


Google search came up with the following:

http://qt-project.org/forums/viewthread/10255

This thread notes that this error occurs when you do not have the Microsoft Platform SDK installed and are using Visual Studio. This makes sense given that it stddef.h

is one of the standard headers (it is usually included using <cstddef>

, but looking at the source for qtcore / global.h it seems that it is indeed included as <stddef.h>

). So, try installing the platform SDK if it doesn't already exist.



If you already have the sdk, it may not be configured properly. This answer says that you need to follow the instructions given by microsoft here in order to execute the command line builds correctly. I think Qt Creator is probably executing the compiler from the command line, so it might help.

If that still doesn't work, try installing the MinGW compiler and using it. I've seen several links saying it's easier to compile for Qt under windows using MinGW.

+3


source







All Articles