nsf / termbox

Library for writing text-based user interfaces
http://code.google.com/p/termbox
MIT License
1.96k stars 185 forks source link

no pkg-config .pc file found #124

Closed amirouche closed 4 years ago

amirouche commented 5 years ago

There is not .pc file coming with termbox which makes it more difficult to work with.

rofl0r commented 5 years ago

the trick is to add -ltermbox to your linker command.

amirouche commented 5 years ago

It more complicated than that.

I have bindings in Scheme and I use autotools to replace the absolute path the shared lib.

Example:

diff --git a/zk/termbox.scm b/zk/termbox.scm
index b3fefdd..f50ae34 100644
--- a/zk/termbox.scm
+++ b/zk/termbox.scm
@@ -171,7 +171,7 @@
 (define-public TB-EFAILED-TO-OPEN-TTY   -2)
 (define-public TB-EPIPE-TRAP-ERROR      -3)

-(define termbox (dynamic-link*
"/home/amirouche/src/scheme/guile/zk/upstream/termbox/build/src/libtermbox.so"))
+(define termbox (dynamic-link*
"/gnu/store/h042yk2kd536hzmkns2ibw484c6qs1aj-termbox-truecolor-2019.01.06-c3afbfd/lib/libtermbox.so"))

 ;; Initializes the termbox library. This function should be called before
any
 ;; other functions. Function tb_init is same as tb_init_file("/dev/tty").
amirouche commented 5 years ago

basically, it can not work without .pc file.

amirouche commented 4 years ago

Personal backlog clean-up.