Finding default search path

I'm trying to compile some stuff on a new computer, which depends on some libraries I just installed. They are installed in /usr/local, and my compiler can't find the header files ("fatal error: 'GLFW/glfw3.h' file not found"), but the same compile-command works on the old computer. How can I find the default search path for the compiler, so I can reinstall the libraries there?

EDIT: I'm using clang++
Last edited on
I believe changing the default path is complicated, and not necessarily a good idea, but maybe someone else can help you there.

I would try pkg-config, on my computer I get this:
1
2
3
4
$ pkg-config --list-all | grep glfw  // figuring out if I can use pkg-config for this library
libglfw  // the name of the library
$ pkg-config --cflags libglfw
-pthread


So you put that in your makefile, or whatever:
cflags=$(shell pkg-config --cflags linglfw)

From the command line, put ` marks around the pkg-config command ( those aren't signle quotes ).

you can also run pkg-config with a --libs flag
Last edited on
If you check the man page for clang++, I imagine it will have a list of the variables that store the various paths it looks in. Just check those out.
Also, clang++ -help will list a ton of options, one of which is: clang++ -print-search-dirs
Topic archived. No new replies allowed.