How to compile and link simple application?

4544fa8d 4544fa8d at gmail.com
Mon Apr 8 19:29:33 UTC 2019


On Monday, 8 April 2019 at 19:05:33 UTC, Julian wrote:
> Shorter:
>   string root_dir() {
>       static string cache;
>       return cache ? cache : (cache = dirName(thisExePath()));
>   }
> This might spam readlink() syscalls if they somehow return the

It's really not possible to call functions in modules like in any 
other languages? :S

---------------------------------------------------------------
import std.file;
import std.path;
import std.stdio;

//const ROOT_DIR = dirName(thisExePath());
int someInt = 0;
string someString = "sfgsdgdf";
writeln("one");

void main(){
	writeln("two");
}
---------------------------------------------------------------



More information about the Digitalmars-d-learn mailing list