1

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

0

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 Aug 4 '18 at 19:02
  • 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 Aug 4 '18 at 19:11
  • sorry, I'm kinda eager to solve this... lol – ProgAndPlay Aug 4 '18 at 21:27
0

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/

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.