#include <stddef.h> compiler error



  • Hi All, I'm new to Qt, I installed the newest sdk and tried creating a very basic Qt widget application -> Qt Gui application. Basically just a hello world type app. I get an error in gglobal.h file:

    C:\QtSDK\Desktop\Qt\4.8.0\msvc2010\include\QtCore\qglobal.h:45: error: C1083: Cannot open include file: 'stddef.h': No such file or directory

    I'm running Qt on Windows 7 box as an administrator. Thanks for your time and help.



  • Do you have MSVC installed in your machine???



  • Thanks for the reply Vijay. No I don't have MSVC installed. I take it you are referring to Microsoft Visual C++. What version do I need?



  • mm.. as per your its says it should be "msvc2010" or the best thing is to use MinGW compiler as it comes pre-installed with Qt SDK. From your project properties select MinGW under Qt Version tab, and select MinGW under Edit build configuration also.

    This should work..



  • I have the same problem.
    there are 3 header files which qtcreator cant fine .
    <comdef.h> <atlbase.h> and <stddef.h>.
    which <stddef.h> is defined and used in "qglobal.h"
    I had Vs 2013 and Vs 2010 installed when i installed QtCreator 5.2
    then i found out that in order for the QtCreator to compile, i need to install VS2012 as well! so i did , this time the compilition is halted with those headers being not found!
    How can i solve this issue ?
    Regards in advance.



  • Any help? i am really having lots of problems.
    i re installed qt 5.2 msvc2012 . apart from my former problem, now if i try to create a default application, it just fails!! with the compiler error :
    bq. F:\ms\Qt5.2.0\5.2.0\msvc2012\include\QtCore\qglobal.h:46: error: C1083: Cannot open include file: 'stddef.h': No such file or directory

    What is going on? please someone help!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.