Minimal Qt5 install to compile code
up vote
3
down vote
favorite
I wrote a little program in C++ using Qt. Back when it was Qt4, in order for my friends to compile my program on their Ubuntu system, I would tell them, after getting my source files, to just run:
sudo apt install libqt4-dev
<navigate to sources directory>
qmake
make
Now that it is Qt5, I read somewhere that the new libqt4-dev
is qtdeclarative5-dev
so I told them to just type the code above with qtdeclarative5-dev
instead of libqt4-dev
.
However qmake
didn't work, it did: qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qmake': No such file or directory
. I quickly found a fix by appending -qt5
:
sudo apt install qtdeclarative5-dev
<navigate to sources directory>
qmake -qt5
make
Is this the correct way to do this? Is there a lighter or quicker Qt install?
compiling application-development qt qt5
This question has an open bounty worth +100
reputation from Seub ending in 10 hours.
This question has not received enough attention.
add a comment |
up vote
3
down vote
favorite
I wrote a little program in C++ using Qt. Back when it was Qt4, in order for my friends to compile my program on their Ubuntu system, I would tell them, after getting my source files, to just run:
sudo apt install libqt4-dev
<navigate to sources directory>
qmake
make
Now that it is Qt5, I read somewhere that the new libqt4-dev
is qtdeclarative5-dev
so I told them to just type the code above with qtdeclarative5-dev
instead of libqt4-dev
.
However qmake
didn't work, it did: qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qmake': No such file or directory
. I quickly found a fix by appending -qt5
:
sudo apt install qtdeclarative5-dev
<navigate to sources directory>
qmake -qt5
make
Is this the correct way to do this? Is there a lighter or quicker Qt install?
compiling application-development qt qt5
This question has an open bounty worth +100
reputation from Seub ending in 10 hours.
This question has not received enough attention.
add a comment |
up vote
3
down vote
favorite
up vote
3
down vote
favorite
I wrote a little program in C++ using Qt. Back when it was Qt4, in order for my friends to compile my program on their Ubuntu system, I would tell them, after getting my source files, to just run:
sudo apt install libqt4-dev
<navigate to sources directory>
qmake
make
Now that it is Qt5, I read somewhere that the new libqt4-dev
is qtdeclarative5-dev
so I told them to just type the code above with qtdeclarative5-dev
instead of libqt4-dev
.
However qmake
didn't work, it did: qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qmake': No such file or directory
. I quickly found a fix by appending -qt5
:
sudo apt install qtdeclarative5-dev
<navigate to sources directory>
qmake -qt5
make
Is this the correct way to do this? Is there a lighter or quicker Qt install?
compiling application-development qt qt5
I wrote a little program in C++ using Qt. Back when it was Qt4, in order for my friends to compile my program on their Ubuntu system, I would tell them, after getting my source files, to just run:
sudo apt install libqt4-dev
<navigate to sources directory>
qmake
make
Now that it is Qt5, I read somewhere that the new libqt4-dev
is qtdeclarative5-dev
so I told them to just type the code above with qtdeclarative5-dev
instead of libqt4-dev
.
However qmake
didn't work, it did: qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qmake': No such file or directory
. I quickly found a fix by appending -qt5
:
sudo apt install qtdeclarative5-dev
<navigate to sources directory>
qmake -qt5
make
Is this the correct way to do this? Is there a lighter or quicker Qt install?
compiling application-development qt qt5
compiling application-development qt qt5
asked Nov 26 at 21:54
Seub
2002416
2002416
This question has an open bounty worth +100
reputation from Seub ending in 10 hours.
This question has not received enough attention.
This question has an open bounty worth +100
reputation from Seub ending in 10 hours.
This question has not received enough attention.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
Correct way to compile using only qmake
command.
You can install qt5-default package to set qt5 as default while using development binaries.
sudo apt-get install qt5-default qtdeclarative5-dev
"Your program was written in qt4 so it was searching qt4 binaries in system": Actually no, I have obtained the same error with another program written in Qt5. I don't know why it tried to compile with qt4.
– Seub
Dec 1 at 17:35
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
Correct way to compile using only qmake
command.
You can install qt5-default package to set qt5 as default while using development binaries.
sudo apt-get install qt5-default qtdeclarative5-dev
"Your program was written in qt4 so it was searching qt4 binaries in system": Actually no, I have obtained the same error with another program written in Qt5. I don't know why it tried to compile with qt4.
– Seub
Dec 1 at 17:35
add a comment |
up vote
1
down vote
Correct way to compile using only qmake
command.
You can install qt5-default package to set qt5 as default while using development binaries.
sudo apt-get install qt5-default qtdeclarative5-dev
"Your program was written in qt4 so it was searching qt4 binaries in system": Actually no, I have obtained the same error with another program written in Qt5. I don't know why it tried to compile with qt4.
– Seub
Dec 1 at 17:35
add a comment |
up vote
1
down vote
up vote
1
down vote
Correct way to compile using only qmake
command.
You can install qt5-default package to set qt5 as default while using development binaries.
sudo apt-get install qt5-default qtdeclarative5-dev
Correct way to compile using only qmake
command.
You can install qt5-default package to set qt5 as default while using development binaries.
sudo apt-get install qt5-default qtdeclarative5-dev
edited Dec 1 at 17:42
answered Dec 1 at 17:33
Ketan Patel
10.1k94365
10.1k94365
"Your program was written in qt4 so it was searching qt4 binaries in system": Actually no, I have obtained the same error with another program written in Qt5. I don't know why it tried to compile with qt4.
– Seub
Dec 1 at 17:35
add a comment |
"Your program was written in qt4 so it was searching qt4 binaries in system": Actually no, I have obtained the same error with another program written in Qt5. I don't know why it tried to compile with qt4.
– Seub
Dec 1 at 17:35
"Your program was written in qt4 so it was searching qt4 binaries in system": Actually no, I have obtained the same error with another program written in Qt5. I don't know why it tried to compile with qt4.
– Seub
Dec 1 at 17:35
"Your program was written in qt4 so it was searching qt4 binaries in system": Actually no, I have obtained the same error with another program written in Qt5. I don't know why it tried to compile with qt4.
– Seub
Dec 1 at 17:35
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1096304%2fminimal-qt5-install-to-compile-code%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown