How to I add /usr/pkg/lib into the search path for the dynamic loader ? Also how do I add the /usr/pkg/include directory into the include path for gcc ? Right now I'm doing #include "/usr/pkg/include/gdbm.h" where as I'd like to do #include <gdbm.h>
# gcc -o main main.c -L/usr/pkg/lib -lgdbm # ./main test /usr/libexec/ld-elf.so.2: Shared object "libgdbm.so.3" not found, required by "main" # gcc -static -o main main.c -L/usr/pkg/lib -lgdbm # ./main test #