GTKD - Application crashes - or not? [Coedit]

TheDGuy via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Jun 16 03:02:01 PDT 2016


On Thursday, 16 June 2016 at 09:27:38 UTC, Basile B. wrote:
> FOrget any previous comment and in your program use the first 
> argument of the command line to detect your resources, this 
> will solve your problem. For the execution click compile and 
> run or just run.

Okay:

void main(string[] args){
     writeln(args[0]);
     Main.init(args);
     auto win = new Window(250,250,"Tutorial");
     Main.run();
}

This gives me the location of the .exe. What should i do with it 
now?

> On Win and Nux, the first argument of the command line is 
> always the program filename so you just have to get the 
> directory for this string and you'll get what you expected with 
> cwd.

I don't care about cwd i want to get rid of the error!




More information about the Digitalmars-d-learn mailing list