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
2 Answers
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. Aug 4, 2018 at 19:02
-
-
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/