May be a simple dub answer if my question even makes sense?

WhatMeWorry via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Sep 25 12:35:38 PDT 2016


On Sunday, 25 September 2016 at 00:52:26 UTC, Mike Parker wrote:
> On Saturday, 24 September 2016 at 16:51:47 UTC, WhatMeWorry 
> wrote:
>
>> [...]
>
> As long as they're public. Imports are private by default, 
> meaning their symbols are only visible locally. Change it to:
>
> module derelict_libraries;
> public import derelict.glfw3.glfw3;
> public import derelict.opengl3.gl3;
>
>>[...]
>
> You can do that with dub without resorting to environment 
> variables. Then you don't need to set it every time you move 
> your flash drive to a different system. See the importPaths 
> directive in the 'Build Settings' section of the documentation 
> ([1] for JSON and [2] for SDLang).
>
>> [...]
>
> Because dub created those paths and downloaded the source for 
> those packages into those paths, it knows where everything is. 
> When it invokes DMD, it uses the -I command line switch just 
> like anyone else would.
>
>> [...]
>
> Well, good, because you don't need to hardcode them.
>
> [1] 
> https://code.dlang.org/package-format?lang=json#build-settings
> [2] 
> https://code.dlang.org/package-format?lang=sdl#build-settings

Wow. That was the fix. Two "public" tokens. Thank you. I don't 
think I ever could of figured that out on my own. My debugging 
was completely off base; I was like a surgeon trying to perform 
an appendectomy by amputating a foot.

Dub is nice.  Just like Derelict.


More information about the Digitalmars-d-learn mailing list