Source files do not appear
-
No the problem keeps recurring.
I can build everything within Qt command prompt using:
qmake -project
qmake
make(make is a batch file to call the MinGW gcc compiler). If I do a build in Qt command prompt then I can edit the source within Qt Creator and build without any problems. If I don't do the Qt command prompt build first then Qt Creator hits the MSVS conflict problem in the build. Any ideas?
-
In Qt Creator's project view on tab build settings on the very bottom you can tweak the environment. There is a checkbox "delete system environment" (or something like that, I have a German version). You can try to check this and get rid of the "polluted" env vars.
-
Thankyou that seems to do the trick. Checking the clean environment box in Projects mode under Build Settings and then setting all of the environment variables solves the issue. If yoiu arte using one of the example applications you have to create a fresh project file though to avoid using the System Environment variables.. So for example with examples/widgets/scribble below the existing project file was:
@HEADERS = mainwindow.h
scribblearea.h
SOURCES = main.cpp
mainwindow.cpp
scribblearea.cppinstall
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/scribble
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS scribble.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/scribble
INSTALLS += target sourcessymbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)@
After running Qmake -project and creating a new project file, below evrerything is fine.
@######################################################################
Automatically generated by qmake (2.01a) Fri 3. Dec 10:02:34 2010
######################################################################
TEMPLATE = app
TARGET =
DEPENDPATH += .
INCLUDEPATH += .Input
HEADERS += mainwindow.h scribblearea.h
SOURCES += main.cpp mainwindow.cpp scribblearea.cpp@ -
One more question though. Is there a quicker way of doing this rather than setting up all of the environment variables manually for each project?
I would use MSVS C++ compilers but with the LGPL there is no support for using MSVS C++. Is this correct? This problem must be common for developers who want to use the LGPL or developers who have a commercial license and have clients who want them to develop under the LGPL for their own future maintenance requirements.
-
As far as I know there is no limitation on compiling the LGPL version with Visual Studio. It seems there are just no prebuilt binaries available, so you will have to compile Qt yourself (that's not difficult, just get you some coffee or, better, have lunch in the meantime :-) )
You will find some instructions on how to compile Qt on Windows here: http://doc.qt.nokia.com/4.7/install-win.html
-
It was on that URL
http://doc.qt.nokia.com/4.7/install-win.html
where I was put off using the LGLP of Qt with Visual Studio.
bq. Open Source Versions of Qt is not officially supported for use with any version of Visual Studio. Integration with Visual Studio is available as part of the Qt Commercial Edition.
Do you advise using Visual Studio over Qt Creator? I have MSVS 6.0 and MSVS 2005.
Thanks again for your help.
-
It's not supported does not mean, it does not work :-)
As the commercial versions are supported by Nokia, I don't see any reasons not to go with MSVS. Although the Visual Studio add in is only available for the commercial users of Qt. Without that, developing Qt in MSVS is quite cumbersome.
I don't know if the open source version of Qt Creator does support MSVS. But as it calls command line tools only, I cannot see any reason why not. I'd give it a try.
-
Volker, quote from qt.nokia.com:
bq. Want to use Qt together with Visual Studio on Windows? Download the Visual-Studio add-in, which can be used for development together with all Qt licenses.
-
Citing http://doc.qt.nokia.com/4.7/install-win.html
bq. Open Source Versions of Qt is not officially supported for use with any version of Visual Studio. Integration with Visual Studio is available as part of the Qt Commercial Edition.
So the Qt docs are not up to date and consistent everywhere. Good to hear, that I'm wrong :-)
-
Volker, yes, I think that info at downloads page at qt.nokia.com is more up to date than docs.
-
Volker, it is "http://qt.nokia.com/downloads":http://qt.nokia.com/downloads . Text itself is at bottom of the page under "Other downloads" header