https://github.com/qeesung/tlpi
The Linux Programming Interface
https://github.com/qeesung/tlpi
Last synced: 9 months ago
JSON representation
The Linux Programming Interface
- Host: GitHub
- URL: https://github.com/qeesung/tlpi
- Owner: qeesung
- Created: 2018-07-18T15:41:40.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-07-18T16:37:38.000Z (over 7 years ago)
- Last Synced: 2025-03-26T14:56:06.798Z (10 months ago)
- Language: C
- Size: 1000 Bytes
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# The Linux Programming Interface
## How to setup env
Download the tlpi source code.
```bash
wget "http://man7.org/tlpi/code/download/tlpi-161214-dist.tar.gz"
```
Unzip the source code, and compile.
```bash
tar -zxvf tlpi-161214-dist.tar.gz
cd tlpi-dist/
make -j
```
Copy the header files to the system include directory.
```bash
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.
```bash
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
```bash
g++ -ltlpi -o
./
```