thisExePath and rdmd
Andrea Fontana
nospam at example.com
Fri Jan 17 01:50:14 PST 2014
Hmm I thought It can be done reading __FILE__ at compile-time,
but it gives me just the relative path.
Recent topic here:
http://forum.dlang.org/thread/meuyppazxkrjcbgmkonl@forum.dlang.org
On Friday, 17 January 2014 at 09:29:48 UTC, Jacob Carlborg wrote:
> On 2014-01-17 10:23, Andrea Fontana wrote:
>> thisExePath "returns the full path of the current executable".
>>
>> If I run something like "./mysource.d" (using rdmd shebang) it
>> returns
>> the full path to compiled executable in /tmp folder (not so
>> useful I
>> think!). Is there a way to have the path of source itself?
>
> That doesn't sound very easy to fix. When running the
> executable it's completely disconnected from the source file it
> was compiled from. Except for possibly some debug info.
More information about the Digitalmars-d-learn
mailing list