I am following the GNU guile tutorial and trying to write a c program that links guile.
I want to compile it with gcc using guix shell. When running eg:
guix shell guile -- gcc -o simple-guile simple-guile.c \
`pkg-config --cflags --libs guile-3.0`
I get a no such file for libguile.h
.
The beginning of the tutorial suggests that guile should be installed in /usr/local/
but my (mis)understanding of guix is that rather than installing in /usr/local/
it should be added gnu/store
automatically (using eg guix install
) and added to the include path automatically. Is this wrong?
If I check the $C_INCLUDE_PATH
inside the guix shell has /gnu/store/<hash>-profile/include/
which does not have the libguile.h inside. It also has the .guix-home/profile/include
which also doesn’t have the header.
Outside the guix shell, I can find the header file at:
gnu/store/<different-hash>-guile-3.0.9/include/guile/3.0/libguile.h
How do I ensure gcc can access this header within a guix shell
? (short of pointing it directly at the path above, which feels like I’m doing guix wrong)