[cfe-dev] Implementation of stdbool.h
onesadcookie at gmail.com
Thu Feb 28 13:53:22 CST 2008
> The best way I know that avoids having to hard code the prefix into
> the executable is by making clang search the "../include/clang" path
> from its executable. Is there a good way to do this?
On Mac OS X CFBundle knows how to find the absolute path of the
executable. On Linux one can read the symbolic link /proc/self/exe.
On Windows if you open an app from the GUI, the CWD is the one
containing the executable, but if you run it on the command-line
that's presumably not the case... and on other OSes, I don't know of
any way other than Gordon's suggestion of searching PATH for argv.
More information about the cfe-dev