I am writing a program in QT Creator, for the x86 architecture, using Debian 9 x86. The program will use GNU Readline library [8.0]. Also, my program must be statically built (QT is already statically built). For this I downloaded Readline from here. Then performed the configuration for the static assembly:
./configure —prefix=/home/out/readlinelibs/ —enable-static —with-curses
then i performed the construction:
make
and installing libraries
make install
In QT’s pro file I added the path to the libraries:
LIBS += -L/home/out/readlinelibs/lib -static -lreadline -ltinfo
When compiling the program I get the following error in QT:
error: cannot find -ltinfo
How to build readline in static mode? Thanks.
P.S.: in Debian x64 I also built readline and everything works well.
Advertisement
Answer
It was the lack of a tinfo library, as mbieren advised. I performed the installation on a 64-bit system as follows:
Added ability to install 32-bit packages:
sudo dpkg –add-architecture i386
I scanned the package and found that i need. You can do the scan so:
sudo apt-cache search tinfo
Finally i installed that i need:
sudo apt-get install lib32tinfo5 lib32tinfo-dev
Now the compilation of my program for 32-bit architecture is completed successfully!