Qt Integration with Visual C++ 2010 Express Edition, how do I do this correctly?
-
Yes, you can use cl.exe. To my understanding it is the same as in other vc versions.
The location of the Qt libs should not be the problem. Either you have used a prefix in the configuration step, but I think this is only available in linux, or they will be in the directory where you were building the Qt version.
So if you unzip into "C:\Qt" for example, there should be a directory lib now. There you have the libraries you need for linking and also the dlls. The includes are under include. All is straight forward. You need to use the include in the IDE for compilation.You should try to install the "VS-Add-In":http://qt.nokia.com/downloads/visual-studio-add-in and see if you can use it.
Are you planning to use Qt's designer for gui stuff?
-
You should also know that you cannot just run nmake in the directory of your project. You should first run @qmake ProjectName.pro@ It will generate Makefile from your ProjectName.pro file.
Actually, I would recommend to use Qt Creator as an IDE for developing with Qt. I personally find it very handy (much more handy than Visual C++ IDE). You will only need to install CDB in order to debug application, compiled with MS VC++, in Qt Creator (see Creator documentation for more info).
However, if you are new to Qt, it would possibly be much easier to start first with prebuilt versions of Qt Libs: just download Qt libraries 4.7.3 for Windows (minGW 4.4, 319 MB) and Qt Creator 2.2.1 for Windows (52 MB) from "here":http://qt.nokia.com/downloads, install them and start using. As you become more familiar with Qt, you will find no problems in building either Qt Libs, Qt Creator or your application with every supported toolchain.
-
[quote author="koahnig" date="1308858426"]If you are not familiar with Visual Studio and you do not require the microsoft compiler, it is certainly a good recommendation to consider Qt Creator. [/quote]
Visual Studio support of C++ is not so impressive comparing to C# or VisualBasic.NET. So, even if you’re familiar with Visual Studio, using of Qt Creator for development with Qt is, possibly, better approach.
Just personal opinion, of course.
-
I've tried to install the VS add-in, it said that express wasn't compatable.
bq. You should also know that you cannot just run nmake in the directory of your project. You should first run qmake ProjectName.pro, it will generate Makefile from your ProjectName.pro file.
But how should I create a makefile if I'm only using VC++, in which case I don't have any .pro files?
I'll consider using the Qt IDE for all of my projects that use Qt, I'm just worried about discrepancies between my Qt utilities and external libraries that they use (such as OpenGL, OpenAL, STL, etc) and other components of my game engine, such as the runtime foundation system which won't even use Qt.
So I suppose if I'm still going to be using VC++ for Qt development (if consistency is required), the question I have is how would I create a makefile for my Visual Studio project files that use Qt?
-
Work with external libraries will not depend on what IDE you use.
You need qmake and pro file because qmake will not only generate Makefile, it will as well call "moc":http://doc.qt.nokia.com/4.7/moc.html to generate a number of extra *.h and *.cpp files (this is because Qt uses some C++ language extensions that are not supported by compilers, e.g. slots and signals, advanced RTTI).
Qt supports OpenGL ("examples":http://doc.qt.nokia.com/4.7/examples-opengl.html), you can easily use STL things (though Qt has its own useful containers), you can use Qt with Boost. I see no reason for Qt not to be compatible with OpenAL. And, again, it all doesn’t depend on IDE.
I will strongly recommend you to spend some time learning Qt essentials, before you use it in your application. Qt is powerful and easy-to-use library, but it needs some effort to become familiar with. Luckily, there’re a lot of documentation, tutorials, examples and so on. This is some links:
- "Qt Documentation":http://doc.qt.nokia.com/
- "Qt Learning materials":http://qt.nokia.com/developer/learning/online/training/
- A lot of examples in _«QtDir»\examples_. They are also explained in documentation.
- And this forum, of course.
-
[quote author="AutoBot" date="1308859391"]
So I suppose if I'm still going to be using VC++ for Qt development (if consistency is required), the question I have is how would I create a makefile for my Visual Studio project files that use Qt?[/quote]You will need to create .pro file (its format explained "here":http://doc.qt.nokia.com/4.7/qmake-tutorial.html and "here":http://doc.qt.nokia.com/4.7/qmake-common-projects.html). If you use Qt Creator or VS with Qt Add-in, all this will be generated automatically.
To build your project you should then run qmake and then nmake or jom.
-
[quote author="DSav" date="1308858917"]Visual Studio support of C++ is not so impressive comparing to C# or VisualBasic.NET. So, even if you’re familiar with Visual Studio, using of Qt Creator for development with Qt is, possibly, better approach.[/quote]
I am certainly not someone trying to defend MS products by all means. However, I am using them for long time now. My experience is limited to C++ there. I have started recently with Qt Creator on Linux. So far, I have not found a very good reason to switch completely. By saying so, I have to admit it is probably a part of laziness behind. The philosopies are different and I struggle quite a bit to get things done in Qt Creator.
However, my personal recommendation is, if you have to get used to both IDEs anyhow, I would choose Qt Creator.
-
@AutoBot
you first should start with Qt documentation. Express versions does not support add ins, you can read the restrictions on the microsoft pages.Qt should be created on command line (you also need da different commandline when using 64 bit), after configure call simply nmake.
To work with express VS 2010, you have a lot of work to configure the pre runs, i.e moc, uic, and so on. It is better to work with the qmake pro-files, and use express as editor.... VcProjX creating by hand is a hard working job...So as koahnig wrote, Qt Creator is better for you. You can still use VS 2010 compiler, for debugging you need to install debugging tools from Microsoft.... And Qt Creator has "VS Addin" included.....
Or buy VS Studio 2010 professional, than you are able to work with VS Addin..
-
hi there is a way to buid a Qt project in msvc express editon..download the pdf from the link..
portfolio.delinkx.com/files/Qt.pdfin the second part of PDF procedure is given...hopefully it will be helpfull for you..