How can I obtain the filename of the executable? [Solved]

Just starting out? Need help? Post your questions and find answers here.
User avatar
Dreamland Fantasy
Enthusiast
Enthusiast
Posts: 334
Joined: Fri Jun 11, 2004 9:35 pm
Location: Glasgow, UK
Contact:

How can I obtain the filename of the executable? [Solved]

Post by Dreamland Fantasy »

Hi there,

I'm looking for a way to obtain the filename of the compiled executable when it is being run. I know on Windows you can use the GetModuleFileName_() function, but is there a more generic way of achieving this that will also work on Linux and MacOS?

Kind regards,

Francis
User avatar
Dreamland Fantasy
Enthusiast
Enthusiast
Posts: 334
Joined: Fri Jun 11, 2004 9:35 pm
Location: Glasgow, UK
Contact:

Re: How can I obtain the filename of the executable?

Post by Dreamland Fantasy »

Nevermind, just found it (i.e. ProgramFilename())! :oops:

Kind regards,

Francis
Post Reply