include vs include_lib
Wed Jul 22 16:12:41 CEST 2009
Peter Mechlenborg <peter.mechlenborg@REDACTED> writes:
> I have found myself starting to always use '-include_lib()' instead of just
> '-include()', because it makes compilation easier - you don't need to
> specify include directories, and files become "self-contained" regarding
> Why do people use '-include()' instead of '-include_lib()'? Am I missing
> something obvious here?
iirc, include_lib("blah/include/foo.hrl"). only works if "blah/ebin"
is in the load path (i.e. what code:get_path() gives you).
this might or might not be a problem. it's obviously not a problem for
OTP supplied headers.
More information about the erlang-questions