[cfe-dev] Implementation of stdbool.h
mattastic82 at gmail.com
Thu Feb 28 13:24:37 PST 2008
On Thu, Feb 28, 2008 at 1:53 PM, Keith Bauer <onesadcookie at gmail.com> wrote:
> 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.
On Windows, I've found using GetModuleHandle(0) and GetModuleFileName
to work fairly well.
I am not sure it works in all cases, but might be a good starting point.
More information about the cfe-dev