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

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!

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.

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):
Start Qt Creator
Menu: Help | Start Updater
Package manager (Maintain Qt SDK)
In the tree view : Qt SDK / Development Tools / Qt 4.7.4 / Desktop Qt 4.7.4 - MinGW
--Harald-René Flasch (aka hfrmobile)

Related

Which Qt to download?

I am new to C++ and have been working with MS VISUAL STUDIO 2010 Express. However, I am in need to shift to Qt as my university recommends. Unfortunately, the qt.nokia.com is redirecting to another site http://qt.digia.com/.
Since everything in that site is not free, I found the following link called "Qt Open Source Version". Is this is the site to download Qt?
When I go there, I can see various options, which means number of downloads. I have windows 7 ultimate and got visual studio 2010 express installed in my machine. But, this site got number of windows downloads. I prefer the one which claims to come with the Qt IDE (Qt Creator??). If you need further more information, I will be using this Qt GUI C++ applications with OpenCV.
I have already installed OpenCV and it works with VS so if you can, please tell me how to set it up with Qt as well.
Please help me to download the correct version of Qt. Thanks
Answering to these kind of question is always hard and dangerous!
I know you had experiences with VS but
I'm going to offer you to choose MinGW instead.
Download link
qt-project is the correct place to get open source Qt.
There are prebuilt binaries of Qt 5.0 for VS2012, but if you want to use Qt 4.8 with VS2012 you'll need to compile it yourself, as there are no prebuilt binaries for VS2012 (yet?). Compiling Qt is not difficult, just open command prompt for VS2012, run configure --help to find out how you can customize your Qt build. Then run configure with appropriate parameters, then nmake.
If you decide to use Qt Creator as an IDE you are welcome to do it - Qt Creator can compile projects using different compilers, including VS2012 compiler. But in order to debug projects compiled with VS2012 compiler you'll either need to use VS2012 or install Debugging Tools for Windows (which Qt Creator will find and use to debug VS2012-generated executables).
http://qt-project.org/downloads
Qt 5.0
Select the file according to your operating system from the list below to get the latest Qt 5.0 for your computer. The binary packages include Qt 5.0.2 libraries and Qt Creator 2.7.0
Qt 5.0.2 for Windows 32-bit (VS 2010, 485 MB)

QT creator and Designer difference - Starting QT

I am trying to learn the QT framework so that I could develop GUI based C++ applications using QT. I am currently using Windows 7 64bit . So far I have just downloaded the QT library from here. All the tutorials I came across use QT Creator and I only have QT designer.
My question is should I download QT creator ? if so which one ? Can I simply use forms created in QT designer in my visual studio 2010 console app ?? Any suggestions or links that might help would be appreciated
Qt designer is a part of IDE, it is used to generate a code for widgets(look and fill interface);
Qt creator is IDE;
If you used to work with Visual studio 2010, I advice you to download Qt plugin for it(http://qt-project.org/downloads), which allows to enjoy Qt library in VS (it provides Qt designer).
I have the expirience both with Qt Creator and VS 2010 plugin, difference is subtle.
From QT's own forum
QT Designer is for designing dialog's and Main Windows. QT Creator
is a full IDE for developing your programs It comes with an
integrated version of Qt Designer.
I'm asking for a good re-confirmation! (don't take it otherwise)..
As I'm quite new in the Qt platform, I've found it quite confusing!!
In Windows platform, you've:
Qt 5.4.1 for Windows 32-bit (VS 2012, OpenGL) which is a whooping 644 MB file!
& also the info about "Qt Creator" in download says:
Blockquote
Qt Creator 3.3.1 is included in the Qt 5.4.1 binary packages.
If you need a standalone installer, please select the file according to your operating system from the list below to get the latest Qt Creator for your computer
--- this a layman would understand as Qt Creator is the GUI of Qt IDE & also you need to download "Qt 5.4.1 for Windows" which is a whooping 644MB !!
so, is this the case?
or I've to download just the Qt Creator for my work?

installing Qt for VS2010

after finding that its too hard to write GUI applications with WIN32API today im going to learn Qt. so I installed qt as follows.
first I installed VS 2010 express. its OK.
then downloaded Qt libraries 4.8.3 for Windows (VS 2010, 235 MB) from http://qt-project.org/downloads and installed it as a normal software. (in C:\Qt\4.8.3) it automatically installed assistant, designer ... ect.
then downloaded Qt Creator 2.6.0 for Windows (51 MB) from http://qt-project.org/downloads and installed it also as a normal program.
now in qt creater when I try to creat a Qt project it says that no valide kits found.
here are some screenshots of the issue im facing.
what should I do now to start qt. please I need someones help to procced.
You don't need QtCreator AND visual studio.
QtCreator is Qt's own IDE and uses g++/mingw as the compiler (included in the download).
Qt includes QtDesigner - the graphical UI designer that you can use with visual studio or QtCreator.
If you want to use VS, install the qt-vs-addin and download the VS builds of the Qt libs.
If you want to use QtCreator, download the mingw builds of Qt.
Or in both cases you can download the source and build it from scratch using wither QtCreator or VS.
edit: You can make QtCreator use the VS compiler backend - in which case you should download the VS build of Qt. Personally I have never done this - if you are using VS then you may as well use the VS ide.
edit2: The free express version of VS can't use plugins - so its a bit of pain to use with Qt. In this case you should probably use QtCreator.

Qt Creator with Visual C++ 11

I want to use Qt Creator with MS VC++ 11 but it says there is no toolchain to build Qt.
I installed Qt with the full SDK installer.
What to do now?
Isn't MSVC++ 11 comes with Visual Studio 11? If so then Qt hasn't supported makespec file for that version AFAIK (correct me if I am wrong). But following are the (rough) steps for running Qt Creator with MSVC 2010 nmake/cl tool-chain..
Download Qt SDK 4.8.2 compiled using msvc-2010 toolchain from this site (second page).
Install MS VC++ 2010 free development tools (or full SDK), which comprises of nmake/cl/cdb executables.
Restart PC so as to initialize environment variable and all.
Start Qt Creator, by now you will notice msvc-2010 tool-chain has been identified by Qt Creator (Tools -> Options Dialog). If not then manually add it.
Also confirm that Qt version 4.8.2 of msvc-2010 has been identified in Qt Versions tab. If not then manually add it by giving path of qmake in bin of Qt SDK folder. It will also select msvc-2010 tool-chain automatically.
Here you go, now go to Projects and in Build Settings, select msvc-2010 tool-chain and compile. Make sure win32-msvc2010 is selected as makespec file.
Hope this helps.
try building using the makespec of Visual Studio 2010.
SET QMAKESPEC=win32-msvc2010
before running configure and qmake should do the job

Qt 4.7.1, Qt Creator and VS 2010 installation problems

On my computer (Win7 32, VS2010 Ultimate) I would like to use Qt Creator and Qt Visual Studio add in, both LGPL versions.
There are minGW and VS2008 versions of Qt frameworks on the Nokia websites, I did not find VS 2010 version.
So I have installed Qt 2010.05 SDK and in the VS 2010 Command prompt the following steps have been performed:
configure -static
nmake sub-src
I checked Qt Creator and it successfully runs. After the translation has been finished I installed VS 2010 add I tried to add new Qt version int the path
C:\Qt\2010.05\qt
But the following error message has been appeared:
Qt in the given path was built using minGW
It do not understand why because the translation has been performed for the VS2010.
Where is the error? How to install it correctly?
I found out from a German Qt forum that, VS add-in looks for libqtmain.a and libqtmaind.a files to determine if it is built with MinGW. Guess what? Qt ships with those files.
Delete them, and you will be fine.
FWIW, The Vs2008 version works fine with VS2010. I didn't need to build it or anything. You can install that and then just run the latest version of the VS plug-in installer and you should see the Qt menu options in VS2010.
AFAIR your command line is incomplete: I remember one had to specify the build platform. It could be that it's using mingw to build Qt since you didn't specify the VS version in the parameters. The following post might be of interest to you: Building Qt 4.5 with Visual C++ 2010