Compilation errors in Ubuntu 18.04 LTS for a QT-based project
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;
up vote
1
down vote
favorite
When running make, the following errors appear in terminal:
//usr/local/lib/liblua.a(loadlib.o)à: In function ëàlookforfuncàûà:
loadlib.c:(.text+0x576): warningÃÂ : Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/x86_64-linux-gnu-ldÃÂ : cannot find -lQt5Widgets
/usr/bin/x86_64-linux-gnu-ldÃÂ : cannot find -lQt5Gui
/usr/bin/x86_64-linux-gnu-ldÃÂ : cannot find -lQt5Core
/usr/bin/x86_64-linux-gnu-ldÃÂ : cannot find -lGL
collect2: error: ld returned 1 exit status
gcc ld
add a comment |Â
up vote
1
down vote
favorite
When running make, the following errors appear in terminal:
//usr/local/lib/liblua.a(loadlib.o)à: In function ëàlookforfuncàûà:
loadlib.c:(.text+0x576): warningÃÂ : Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/x86_64-linux-gnu-ldÃÂ : cannot find -lQt5Widgets
/usr/bin/x86_64-linux-gnu-ldÃÂ : cannot find -lQt5Gui
/usr/bin/x86_64-linux-gnu-ldÃÂ : cannot find -lQt5Core
/usr/bin/x86_64-linux-gnu-ldÃÂ : cannot find -lGL
collect2: error: ld returned 1 exit status
gcc ld
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
When running make, the following errors appear in terminal:
//usr/local/lib/liblua.a(loadlib.o)à: In function ëàlookforfuncàûà:
loadlib.c:(.text+0x576): warningÃÂ : Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/x86_64-linux-gnu-ldÃÂ : cannot find -lQt5Widgets
/usr/bin/x86_64-linux-gnu-ldÃÂ : cannot find -lQt5Gui
/usr/bin/x86_64-linux-gnu-ldÃÂ : cannot find -lQt5Core
/usr/bin/x86_64-linux-gnu-ldÃÂ : cannot find -lGL
collect2: error: ld returned 1 exit status
gcc ld
When running make, the following errors appear in terminal:
//usr/local/lib/liblua.a(loadlib.o)à: In function ëàlookforfuncàûà:
loadlib.c:(.text+0x576): warningÃÂ : Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/x86_64-linux-gnu-ldÃÂ : cannot find -lQt5Widgets
/usr/bin/x86_64-linux-gnu-ldÃÂ : cannot find -lQt5Gui
/usr/bin/x86_64-linux-gnu-ldÃÂ : cannot find -lQt5Core
/usr/bin/x86_64-linux-gnu-ldÃÂ : cannot find -lGL
collect2: error: ld returned 1 exit status
gcc ld
asked 2 days ago
![](https://i.stack.imgur.com/6dooC.jpg?s=32&g=1)
![](https://i.stack.imgur.com/6dooC.jpg?s=32&g=1)
ProgAndPlay
808
808
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
0
down vote
I did search on packages.ubuntu.com.
According to it you need the following packages:
for compilation:
sudo apt-get install qtbase5-dev libgl1-mesa-dev
at run time:
sudo apt-get install libqt5widgets5 libqt5gui5 libqt5core5a libgl1
well, I have found the libs, I have copied libQt5Widgets.so and others from /usr/lib/x86_64-linux-gnu to /usr/lib but the errors still appear.
â ProgAndPlay
yesterday
You should not copy anything from anywhere to the places maintained by package manager (APT)!!! With such actions you can trash and mess your system!!! If you want to copy some lib, copy it to the folder folder with your compiled binary.
â N0rbert
yesterday
sorry, I'm kinda eager to solve this... lol
â ProgAndPlay
yesterday
add a comment |Â
up vote
0
down vote
I have solved it by adding these entries in the projects ".pro" file and then generating again the Makefile with qmake.
The entries are:
QMAKE_CFLAGS += -no-pie
QMAKE_CXXFLAGS += -no-pie
QMAKE_LFLAGS += -no-pie -fPIC
LIBS += -llua -ldl -L/usr/lib/x86_64-linux-gnu/
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
I did search on packages.ubuntu.com.
According to it you need the following packages:
for compilation:
sudo apt-get install qtbase5-dev libgl1-mesa-dev
at run time:
sudo apt-get install libqt5widgets5 libqt5gui5 libqt5core5a libgl1
well, I have found the libs, I have copied libQt5Widgets.so and others from /usr/lib/x86_64-linux-gnu to /usr/lib but the errors still appear.
â ProgAndPlay
yesterday
You should not copy anything from anywhere to the places maintained by package manager (APT)!!! With such actions you can trash and mess your system!!! If you want to copy some lib, copy it to the folder folder with your compiled binary.
â N0rbert
yesterday
sorry, I'm kinda eager to solve this... lol
â ProgAndPlay
yesterday
add a comment |Â
up vote
0
down vote
I did search on packages.ubuntu.com.
According to it you need the following packages:
for compilation:
sudo apt-get install qtbase5-dev libgl1-mesa-dev
at run time:
sudo apt-get install libqt5widgets5 libqt5gui5 libqt5core5a libgl1
well, I have found the libs, I have copied libQt5Widgets.so and others from /usr/lib/x86_64-linux-gnu to /usr/lib but the errors still appear.
â ProgAndPlay
yesterday
You should not copy anything from anywhere to the places maintained by package manager (APT)!!! With such actions you can trash and mess your system!!! If you want to copy some lib, copy it to the folder folder with your compiled binary.
â N0rbert
yesterday
sorry, I'm kinda eager to solve this... lol
â ProgAndPlay
yesterday
add a comment |Â
up vote
0
down vote
up vote
0
down vote
I did search on packages.ubuntu.com.
According to it you need the following packages:
for compilation:
sudo apt-get install qtbase5-dev libgl1-mesa-dev
at run time:
sudo apt-get install libqt5widgets5 libqt5gui5 libqt5core5a libgl1
I did search on packages.ubuntu.com.
According to it you need the following packages:
for compilation:
sudo apt-get install qtbase5-dev libgl1-mesa-dev
at run time:
sudo apt-get install libqt5widgets5 libqt5gui5 libqt5core5a libgl1
edited 2 days ago
answered 2 days ago
N0rbert
13.5k32664
13.5k32664
well, I have found the libs, I have copied libQt5Widgets.so and others from /usr/lib/x86_64-linux-gnu to /usr/lib but the errors still appear.
â ProgAndPlay
yesterday
You should not copy anything from anywhere to the places maintained by package manager (APT)!!! With such actions you can trash and mess your system!!! If you want to copy some lib, copy it to the folder folder with your compiled binary.
â N0rbert
yesterday
sorry, I'm kinda eager to solve this... lol
â ProgAndPlay
yesterday
add a comment |Â
well, I have found the libs, I have copied libQt5Widgets.so and others from /usr/lib/x86_64-linux-gnu to /usr/lib but the errors still appear.
â ProgAndPlay
yesterday
You should not copy anything from anywhere to the places maintained by package manager (APT)!!! With such actions you can trash and mess your system!!! If you want to copy some lib, copy it to the folder folder with your compiled binary.
â N0rbert
yesterday
sorry, I'm kinda eager to solve this... lol
â ProgAndPlay
yesterday
well, I have found the libs, I have copied libQt5Widgets.so and others from /usr/lib/x86_64-linux-gnu to /usr/lib but the errors still appear.
â ProgAndPlay
yesterday
well, I have found the libs, I have copied libQt5Widgets.so and others from /usr/lib/x86_64-linux-gnu to /usr/lib but the errors still appear.
â ProgAndPlay
yesterday
You should not copy anything from anywhere to the places maintained by package manager (APT)!!! With such actions you can trash and mess your system!!! If you want to copy some lib, copy it to the folder folder with your compiled binary.
â N0rbert
yesterday
You should not copy anything from anywhere to the places maintained by package manager (APT)!!! With such actions you can trash and mess your system!!! If you want to copy some lib, copy it to the folder folder with your compiled binary.
â N0rbert
yesterday
sorry, I'm kinda eager to solve this... lol
â ProgAndPlay
yesterday
sorry, I'm kinda eager to solve this... lol
â ProgAndPlay
yesterday
add a comment |Â
up vote
0
down vote
I have solved it by adding these entries in the projects ".pro" file and then generating again the Makefile with qmake.
The entries are:
QMAKE_CFLAGS += -no-pie
QMAKE_CXXFLAGS += -no-pie
QMAKE_LFLAGS += -no-pie -fPIC
LIBS += -llua -ldl -L/usr/lib/x86_64-linux-gnu/
add a comment |Â
up vote
0
down vote
I have solved it by adding these entries in the projects ".pro" file and then generating again the Makefile with qmake.
The entries are:
QMAKE_CFLAGS += -no-pie
QMAKE_CXXFLAGS += -no-pie
QMAKE_LFLAGS += -no-pie -fPIC
LIBS += -llua -ldl -L/usr/lib/x86_64-linux-gnu/
add a comment |Â
up vote
0
down vote
up vote
0
down vote
I have solved it by adding these entries in the projects ".pro" file and then generating again the Makefile with qmake.
The entries are:
QMAKE_CFLAGS += -no-pie
QMAKE_CXXFLAGS += -no-pie
QMAKE_LFLAGS += -no-pie -fPIC
LIBS += -llua -ldl -L/usr/lib/x86_64-linux-gnu/
I have solved it by adding these entries in the projects ".pro" file and then generating again the Makefile with qmake.
The entries are:
QMAKE_CFLAGS += -no-pie
QMAKE_CXXFLAGS += -no-pie
QMAKE_LFLAGS += -no-pie -fPIC
LIBS += -llua -ldl -L/usr/lib/x86_64-linux-gnu/
answered 2 hours ago
![](https://i.stack.imgur.com/6dooC.jpg?s=32&g=1)
![](https://i.stack.imgur.com/6dooC.jpg?s=32&g=1)
ProgAndPlay
808
808
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1062095%2fcompilation-errors-in-ubuntu-18-04-lts-for-a-qt-based-project%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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