Discussion:
Unable to configure plain C++ project in Qt Creator without Qt installed
Alfonso Chartier
2013-02-14 00:38:47 UTC
Permalink
Hi,

I'm currently experimenting with using Qt Creator as the IDE for
development of some of our legacy non-Qt code. I have been able to
customize the build process so that qmake is not used and the correct
compiler is invoked, which is great.

I'm now at the point where I'd like to get other developers on board. I
want to avoid having developers install Qt, as it is a dependency they will
not be using for our legacy code. I tried uninstalling all versions of Qt
on PC, however it now does not let me configure the project because it
complains that a valid kit could not be found. The kit I have defined is
perfectly valid except that "None" shows up for the Qt version, as expected.

My question is: is there a way I can configure a kit such that it doesn't
depend on Qt? If this is currently not possible, is this something that
could be implemented in a future version of Qt Creator? I love Qt Creator
and it's a fantastic IDE, I just think removing the Qt dependency would
make it an IDE that is much easier to adopt for non-Qt-based development.

Thanks!

Alfonso
Loaden
2013-02-14 03:43:29 UTC
Permalink
Try: https://github.com/loaden/qtcreator/
checkout the 2.6 or 2.7 branch, and build it using qmake.
Post by Alfonso Chartier
Hi,
I'm currently experimenting with using Qt Creator as the IDE for
development of some of our legacy non-Qt code. I have been able to
customize the build process so that qmake is not used and the correct
compiler is invoked, which is great.
I'm now at the point where I'd like to get other developers on board. I
want to avoid having developers install Qt, as it is a dependency they will
not be using for our legacy code. I tried uninstalling all versions of Qt
on PC, however it now does not let me configure the project because it
complains that a valid kit could not be found. The kit I have defined is
perfectly valid except that "None" shows up for the Qt version, as expected.
My question is: is there a way I can configure a kit such that it doesn't
depend on Qt? If this is currently not possible, is this something that
could be implemented in a future version of Qt Creator? I love Qt Creator
and it's a fantastic IDE, I just think removing the Qt dependency would
make it an IDE that is much easier to adopt for non-Qt-based development.
Thanks!
Alfonso
_______________________________________________
Qt-creator mailing list
http://lists.qt-project.org/mailman/listinfo/qt-creator
--
*Please don't ask where I come from, It's a shame!*
Best Regards
Yuchen
Alfonso Chartier
2013-02-14 06:51:05 UTC
Permalink
Thanks Loaden. Does this mean that the latest code from github has
different behavior than the Qt Creator 2.6.2 version I am using, in that it
allows you to configure a kit without Qt being installed? If so, would
installing the Qt Creatpr 2.7.0
beta<http://blog.qt.digia.com/blog/2013/02/07/qt-creator-2-7-0-beta-released/>
suffice
(rather than building from source)?

Thanks!

-Alfonso
Post by Loaden
Try: https://github.com/loaden/qtcreator/
checkout the 2.6 or 2.7 branch, and build it using qmake.
Post by Alfonso Chartier
Hi,
I'm currently experimenting with using Qt Creator as the IDE for
development of some of our legacy non-Qt code. I have been able to
customize the build process so that qmake is not used and the correct
compiler is invoked, which is great.
I'm now at the point where I'd like to get other developers on board. I
want to avoid having developers install Qt, as it is a dependency they will
not be using for our legacy code. I tried uninstalling all versions of Qt
on PC, however it now does not let me configure the project because it
complains that a valid kit could not be found. The kit I have defined is
perfectly valid except that "None" shows up for the Qt version, as expected.
My question is: is there a way I can configure a kit such that it doesn't
depend on Qt? If this is currently not possible, is this something that
could be implemented in a future version of Qt Creator? I love Qt Creator
and it's a fantastic IDE, I just think removing the Qt dependency would
make it an IDE that is much easier to adopt for non-Qt-based development.
Thanks!
Alfonso
_______________________________________________
Qt-creator mailing list
http://lists.qt-project.org/mailman/listinfo/qt-creator
--
*Please don't ask where I come from, It's a shame!*
Best Regards
Yuchen
Frédéric Marchal
2013-02-14 12:06:11 UTC
Permalink
Post by Alfonso Chartier
Hi,
I'm currently experimenting with using Qt Creator as the IDE for
development of some of our legacy non-Qt code. I have been able to
customize the build process so that qmake is not used and the correct
compiler is invoked, which is great.
I'm now at the point where I'd like to get other developers on board. I
want to avoid having developers install Qt, as it is a dependency they will
not be using for our legacy code. I tried uninstalling all versions of Qt
on PC, however it now does not let me configure the project because it
complains that a valid kit could not be found. The kit I have defined is
perfectly valid except that "None" shows up for the Qt version, as expected.
My question is: is there a way I can configure a kit such that it doesn't
depend on Qt? If this is currently not possible, is this something that
could be implemented in a future version of Qt Creator? I love Qt Creator
and it's a fantastic IDE, I just think removing the Qt dependency would
make it an IDE that is much easier to adopt for non-Qt-based development.
I did that yesterday. I installed Qt Creator on a brand new computer without
installing Qt.

I had to install MinGW (mingw-get install mingw32-gcc-bin mingw32-make-bin)
and configure that compiler in the "Build & Run" tab.

Then I created a kit with no Qt versions.

I had to create a Makefile to build the project but it works just fine.

I don't have a step by step procedure as I had to poke around before it
started working. If you need more information, let me know and I'll look them
up the next time the computer is powered up.

Frederic
Tobias Hunger
2013-02-14 12:43:49 UTC
Permalink
Hi Alfonso!
Post by Alfonso Chartier
I tried uninstalling all versions
of Qt on PC, however it now does not let me configure the project
because it complains that a valid kit could not be found. The kit I have
defined is perfectly valid except that "None" shows up for the Qt
version, as expected.
Which kind of project are you trying to configure? This sounds like you
are going for one of the qmake-based projects. Those will not work
without a Qt version set since they require qmake which comes as a part
of Qt installation. Most project wizards will use qmake since it is
pretty simple to use and how many Qt apps are build.

"Non-Qt Project>* (CMake Build)" should work without Qt in a kit though.
Post by Alfonso Chartier
My question is: is there a way I can configure a kit such that it
doesn't depend on Qt?
It is, provided you do not use qmake as a build system.
Post by Alfonso Chartier
I love Qt Creator and it's a fantastic IDE, I just think removing the Qt
dependency would make it an IDE that is much easier to adopt for
non-Qt-based development.
Thanks!

Best Regards,
Tobias
--
Tobias Hunger, Senior Software Engineer - Digia, Qt
Digia Germany GmbH, Rudower Chaussee 13, D-12489 Berlin
Geschäftsführer: Mika Pälsi, Juha Varelius, Anja Wasenius
Sitz der Gesellschaft: Berlin. USt-IdNr: DE xxx xxx xxx
Registergericht: Amtsgericht Charlottenburg, HRB 144331 B
Alfonso Chartier
2013-02-15 01:20:03 UTC
Permalink
Thanks Tobias, that makes sense. You are indeed right: I am using
qmake-based projects, which explains why Qt must be in the kit.

I'm trying to make it as painless/lightweight as possible for other
developers to start using Qt Creator for their non-Qt projects. By the
sounds of it, Qt Creator requires either qmake or cmake to be on the
developer's PC in order to work. I'm thinking at this point that I might
just have developers copy qmake.exe onto their PCs rather than having them
download a 400 MB+ Qt library download. Is this a solution you
recommend/others have adopted for similar use cases?

On a related topic, if I do go down the route of just distributing the
qmake.exe, will the 32-bit version that comes with Qt 5.0.1 work on a
64-bit Windows PC for the purposes of Qt Creator picking it up as a Qt
version in a kit? I'm hoping so, as it'll ease distribution and I also
don't see any pre-built versions of Qt for 64-bit Windows.

Thanks!

-Alfonso
Post by Tobias Hunger
Hi Alfonso!
Post by Alfonso Chartier
I tried uninstalling all versions
of Qt on PC, however it now does not let me configure the project
because it complains that a valid kit could not be found. The kit I have
defined is perfectly valid except that "None" shows up for the Qt
version, as expected.
Which kind of project are you trying to configure? This sounds like you
are going for one of the qmake-based projects. Those will not work
without a Qt version set since they require qmake which comes as a part
of Qt installation. Most project wizards will use qmake since it is
pretty simple to use and how many Qt apps are build.
"Non-Qt Project>* (CMake Build)" should work without Qt in a kit though.
Post by Alfonso Chartier
My question is: is there a way I can configure a kit such that it
doesn't depend on Qt?
It is, provided you do not use qmake as a build system.
Post by Alfonso Chartier
I love Qt Creator and it's a fantastic IDE, I just think removing the Qt
dependency would make it an IDE that is much easier to adopt for
non-Qt-based development.
Thanks!
Best Regards,
Tobias
--
Tobias Hunger, Senior Software Engineer - Digia, Qt
Digia Germany GmbH, Rudower Chaussee 13, D-12489 Berlin
Geschäftsführer: Mika Pälsi, Juha Varelius, Anja Wasenius
Sitz der Gesellschaft: Berlin. USt-IdNr: DE xxx xxx xxx
Registergericht: Amtsgericht Charlottenburg, HRB 144331 B
_______________________________________________
Qt-creator mailing list
http://lists.qt-project.org/mailman/listinfo/qt-creator
Tobias Hunger
2013-02-15 10:32:35 UTC
Permalink
Hi Alfonso!
Post by Alfonso Chartier
Thanks Tobias, that makes sense. You are indeed right: I am using
qmake-based projects, which explains why Qt must be in the kit.
Great that we could pin down the issue.
Post by Alfonso Chartier
I'm trying to make it as painless/lightweight as possible for other
developers to start using Qt Creator for their non-Qt projects. By the
sounds of it, Qt Creator requires either qmake or cmake to be on the
developer's PC in order to work.
... or autotools (experimental since 2.5), or Qbs (experimental in the
comming 2.7) or generic projects (to build anything else, stable since
the 1.x release).
Post by Alfonso Chartier
I'm thinking at this point that I might
just have developers copy qmake.exe onto their PCs rather than having
them download a 400 MB+ Qt library download. Is this a solution you
recommend/others have adopted for similar use cases?
qmake needs infrastructure, e.g. all the files in mkspecs directory. It
also serves two different purposes: It is a build system for
applications as well as a tool to detect one Qt version with.

In creator we rely on that detection part: Creator will try to detect a
Qt version by checking for the actual QtCore library to figure out which
platforms/compilers that one needs. This test will fail for your
proposed setup and thus the Qt version will not register properly.

You can of course leave the QtCore library into the place qmake expects
it. You actually do not even need the full library, the first 4k or so
are enough;-)
Post by Alfonso Chartier
On a related topic, if I do go down the route of just distributing the
qmake.exe, will the 32-bit version that comes with Qt 5.0.1 work on a
64-bit Windows PC for the purposes of Qt Creator picking it up as a Qt
version in a kit? I'm hoping so, as it'll ease distribution and I also
don't see any pre-built versions of Qt for 64-bit Windows.
Yeap, a 32bit version should be fine (with the limitations listed above).

Best Regards,
Tobias
--
Tobias Hunger, Senior Software Engineer - Digia, Qt
Digia Germany GmbH, Rudower Chaussee 13, D-12489 Berlin
Geschäftsführer: Mika Pälsi, Juha Varelius, Anja Wasenius
Sitz der Gesellschaft: Berlin. USt-IdNr: DE xxx xxx xxx
Registergericht: Amtsgericht Charlottenburg, HRB 144331 B
Orgad Shaneh
2013-02-15 11:31:38 UTC
Permalink
IIRC, what you need is:
bin/qmake.exe
bin/QtCore4.dll
mkspecs/*
include (can be empty, but should exist)

The absolute paths must be identical on all machines. Install Qt on one
machine then use the same path on all others.
Post by Tobias Hunger
Hi Alfonso!
Post by Alfonso Chartier
Thanks Tobias, that makes sense. You are indeed right: I am using
qmake-based projects, which explains why Qt must be in the kit.
Great that we could pin down the issue.
Post by Alfonso Chartier
I'm trying to make it as painless/lightweight as possible for other
developers to start using Qt Creator for their non-Qt projects. By the
sounds of it, Qt Creator requires either qmake or cmake to be on the
developer's PC in order to work.
... or autotools (experimental since 2.5), or Qbs (experimental in the
comming 2.7) or generic projects (to build anything else, stable since
the 1.x release).
Post by Alfonso Chartier
I'm thinking at this point that I might
just have developers copy qmake.exe onto their PCs rather than having
them download a 400 MB+ Qt library download. Is this a solution you
recommend/others have adopted for similar use cases?
qmake needs infrastructure, e.g. all the files in mkspecs directory. It
also serves two different purposes: It is a build system for
applications as well as a tool to detect one Qt version with.
In creator we rely on that detection part: Creator will try to detect a
Qt version by checking for the actual QtCore library to figure out which
platforms/compilers that one needs. This test will fail for your
proposed setup and thus the Qt version will not register properly.
You can of course leave the QtCore library into the place qmake expects
it. You actually do not even need the full library, the first 4k or so
are enough;-)
Post by Alfonso Chartier
On a related topic, if I do go down the route of just distributing the
qmake.exe, will the 32-bit version that comes with Qt 5.0.1 work on a
64-bit Windows PC for the purposes of Qt Creator picking it up as a Qt
version in a kit? I'm hoping so, as it'll ease distribution and I also
don't see any pre-built versions of Qt for 64-bit Windows.
Yeap, a 32bit version should be fine (with the limitations listed above).
Best Regards,
Tobias
--
Tobias Hunger, Senior Software Engineer - Digia, Qt
Digia Germany GmbH, Rudower Chaussee 13, D-12489 Berlin
Geschäftsführer: Mika Pälsi, Juha Varelius, Anja Wasenius
Sitz der Gesellschaft: Berlin. USt-IdNr: DE xxx xxx xxx
Registergericht: Amtsgericht Charlottenburg, HRB 144331 B
_______________________________________________
Qt-creator mailing list
http://lists.qt-project.org/mailman/listinfo/qt-creator
Loading...