Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

include path #70

Closed
shian opened this issue May 18, 2018 · 2 comments
Closed

include path #70

shian opened this issue May 18, 2018 · 2 comments

Comments

@shian
Copy link
Contributor

shian commented May 18, 2018

Hi

May I ask why put "filename:rootname(File)" in include path ?
I thought it may change to filename:dirname(File) ++ "/../include"

get_settings_include_paths() ++ [filename:dirname(File), filename:rootname(File) | get_include_path_from_rebar_config()].

@wojteksurowka
Copy link
Contributor

Look at
http://erlang.org/doc/man/erlc.html

-I

Instructs the compiler to search for include files in the Directory. When encountering an -include or -include_lib directive, the compiler searches for header files in the following directories:

    1. ".", the current working directory of the file server

    2. The base name of the compiled file

    3. The directories specified using option -I; the directory specified last is searched first

The line you quoted is to support the item 2.

@shian
Copy link
Contributor Author

shian commented May 18, 2018

Hi

I see. I never use item 2 before.
Thanks

@shian shian closed this as completed May 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants