Importing modules under DUB on Windows

DLearner bmqazwsx123 at gmail.com
Thu Oct 27 16:40:20 UTC 2022


On Thursday, 27 October 2022 at 00:35:26 UTC, Hipreme wrote:
> On Wednesday, 26 October 2022 at 22:51:53 UTC, DLearner wrote:
>> On Wednesday, 26 October 2022 at 18:53:58 UTC, Hipreme wrote:
>>> On Wednesday, 26 October 2022 at 18:37:00 UTC, DLearner wrote:
>>>> [...]
>>>
>>> The linker failed to resolve because it didn't include the 
>>> symbols you imported.
>>> Think of import a way to the compiler resolve the compilation.
>>> Think of source a way to both the compiler and the linker to 
>>> resolve compilation and linking.
>>>
>>> If you give only the import path, you will need a library.
>>>
>>> What you actually want is to put your new importPath to the 
>>> JSON array `sourcePaths`
>>
>> Added `"sourcePaths": [ "C\\Users\\..." ]`
>> Unfortunately failed with 
>> `core.exception.AssertError at source\dub\internal\vibecompat\inet\path.d(222): Trying to append absolute path.`
>>
>> I tried to construct a relative path to the module directory 
>> from the project directory, that didn't work either.
>
> Okay. So this error is very strange, the other thing I can give 
> you advice is:
> If your other thing is another dub project, you can add it as a 
> dependency by putting in your dub.json
>
> ```json
> "dependencies" : {
>    "your_project_name" : {"path" : "your/path/here"}
> }
> ```
>
> AFAIK, there is no problem in putting an absolute path 
> dependency, in fact, I'm using things from another drive letter.

Hi

I'm not getting on with DUB.
Maybe fewer people use it under Windows, so Windows constructs 
don't get exercised so much.

Is there a non-DUB way of arranging that
`import arsd.terminal;`
will use that module as held on GitHub?
(DUB name: "arsd-official:terminal": "~>10.9.4").

OS: Windows 10. Compiler: DMD.

Best regards


More information about the Digitalmars-d-learn mailing list