Configure Mac native Clang with Macports paths -


when compiling projects make use of libraries installed via macports (boost, opencv, etc) need pass clang library , include file locations via -i , -l arguments.

is there "official" way direct apple native clang in these locations default.

i guess make bash script effect of

clang -i/opt/local/include -l/opt/local/lib %@ 

and call instead of compiler, there cleaner way point clang these locations automatically?

i not looking xcode based fix, instead able compile command line without having manually type above arguments in each time.

any suggestions?

i had similar question answered on macports mailing list[0].

export these environment variables.

export cppflags='-isystem/opt/local/include' export ldflags='-l/opt/local/lib' 

p.s. hope you've not been waiting long answer :)

[0] https://lists.macports.org/pipermail/macports-users/2017-july/043562.html


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -