Skip to content

qeesung/tlpi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

The Linux Programming Interface

How to setup env

Download the tlpi source code.

wget "http://man7.org/tlpi/code/download/tlpi-161214-dist.tar.gz"

Unzip the source code, and compile.

tar -zxvf tlpi-161214-dist.tar.gz
cd tlpi-dist/
make -j

Copy the header files to the system include directory.

cd lib/
sudo cp tlpi_hdr.h /usr/local/include/
sudo cp get_num.h /usr/local/include/
sudo cp error_functions.h /usr/local/include/
sudo cp ename.c.inc /usr/local/include/

Make a static shared library.

g++ -c get_num.c error_functions.c
ar -crv libtlpi.a get_num.o error_functions.o
sudo cp libtlpi.a /usr/local/lib

How to compile a c file and run it

g++ <filename> -ltlpi -o <exec_file>
./<exec_file>

About

The Linux Programming Interface

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages