[Help] How to set up the Qt include\Library path for Visual Studio 2010
First of all I would suggest you to use QtCreator. It makes all things with Qt pretty easy. (AFAIK it is included in the SDK)
Did you create a new c++ project in Visual Studio?
If you did so Qt requires .pro files "as explained here":http://doc.qt.nokia.com/4.7/qmake-project-files.html . You can then use qmake with parameter -tp vc to create a Visual Studio project. This has all required qt Libraries added aswell as all of the other stuff you wrote in your .pro file.
I guess the lib path should be something like c:\Qt\2010.5.10\qt\lib – I don’t have a Windows setup to confirm it right now, but the path probably looks like that.
Sorry, I forgot to mention that I also tried include " c:\Qt\2010.5.10\qt\lib" and "c:\Qt\2010.5.10\lib" too, but it still does work :p
Thanks for your reply, I will try it later. But according to your suggestion I got another question about creator. Is it a IDE just for Qt or I can easily use any other API in it? And is it got a nice debug tools like VS 2010 exp. Since I am trying to add a GUI to an OpenGL application. I am not sure the creator is handy or not for this task.
Don't use creator if you have Visual studio. Visual studio is a much more powerful tool than creator. An easy way to setup include paths and library paths is to install the Qt visual studio add in.
"Visual studio add in.":http://qt.nokia.com/downloads/visual-studio-add-in
Plus, hard coding those paths isn't such a good idea other. Look into setting up system variables. I use QTDIR. Then all you have to do in visual studio is $(QTDIR)\lib and $(QTDIR)\include.
Thanks for your reply steno. I think VS is cool :)
If it is a LINK error then it definitely is not about include pathes since the linked does not care at all about header files.
Check the library include pathes instead.
I want to ask kusanagirong: if u compiled properly
1). open command prompt from VS2010
2). Run configure.exe after changing to QT sdk dir
3). after successful configure run "nmake -f"
it will create the libraries for VS2010 compatible and debug files. it also convert your Qt Examples and demo projects to VS project.
this process is very lengthy and takes hours to compile.
but u can compile project from QtCreator only by setting Qt Qmake path.
as qt plugin cannot be installed on a VS2010 Exp edition.
there is custom compilation of Qt project in VS (like MOC, UIC etc.) which requires Qt plugin, only possible in VS pro/team/ultimate etc not in Express ed.
kusanagirong: Give Qt Creator a try:-) I absolutely prefer it to visual studio ...
[quote author="Tobias Hunger" date="1285928770"]kusanagirong: Give Qt Creator a try:-) I absolutely prefer it to visual studio ...[/quote]
i also think its best for qt applications
bq. Tobias Hunger wrote:
kusanagirong: Give Qt Creator a try:-) I absolutely prefer it to visual studio …
Lol, you're a troll..... you get paid to say that.
steno: No, I am payed to hack on the most awesome IDE there is:-)
Well im Not a Troll but creator is Best for qt in my opinion
yeah, QT is fast, easy and handy only u've to remember its short keys. and most impotant it is not bloated like vs.
in case of compilation of code MS compiler is fast (also generate the debug info, means if error occurs it through an exception message not in case of mingw. it just close app).
pushpendrak: You are aware that you can use the msvc compiler and cdb debugger with creator?
yes i am using it also. it works fine -but is not much helpful. if app crashes it let me know what was the error okey.....
pushpendrak: Do you want the debugger to be brought up when an application crashes automatically? That is called "post-mortem debugging" and can be enabled in creator. By default it is off since many people report they find it annoying.
yes it is there, but when i m app is coming into creator it shows only assembly, what i'll do with that?
not of any use.
like as in vs it produces program database (.pdb) which will trace it to exact line in code.
As far as I know that should work with creator, too. Have you considered to file a "bug report":http://bugreports.qt.nokia.com/?
Not actually, for this i use vs2008 integration with Qt.