Cannot open include file :'stddef.h' No such file or directory found error when creating a sample Qt application

北慕城南 提交于 2019-12-10 18:29:12

问题


stddef.h file is there in installed Nokia Qt SDK include folder, but still I am getting compile error on running Qt Simulator. Any ideas?

Thanks in advance!


回答1:


This error message happened with me when I tried to compile for Windows with the VS2008 version of Qt, but Visual C++ 2008 was in fact not installed to my computer. (VS2010 was, but that didn't matter.)

I have the following ideas for you:

  • Try installing Visual C++ 2008
    or
  • Try using MinGW instead of VS2008

The Qt simulator itself is not of much use though, so don't feel bad if you don't manage to make it work. Running your application on the target device itself is the best, and for debugging purposes, you can also compile your stuff for desktop OSes.




回答2:


Some details to "Try using MinGW instead of VS2008": It is not enough having Visual Studio 2008 Visual C++ (compiler) installed. You'll need the Windows platform SDK too. But there is an easier way to compile a Qt application under Windows: MinGW

If having Qt Creator already installed (otherwise: http://qt.nokia.com/downloads --> Qt_SDK_Win_online_v1_1_3_en.exe --> custom installation --> Qt SDK / Development Tools / Qt 4.7.4 / **Desktop Qt 4.7.4 - MinGW):

  1. Start Qt Creator
  2. Menu: Help | Start Updater
  3. Package manager (Maintain Qt SDK)
  4. In the tree view : Qt SDK / Development Tools / Qt 4.7.4 / Desktop Qt 4.7.4 - MinGW

--Harald-René Flasch (aka hfrmobile)



来源:https://stackoverflow.com/questions/4303597/cannot-open-include-file-stddef-h-no-such-file-or-directory-found-error-when

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!