questions about dub

Mike Parker via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Mar 21 21:06:50 PDT 2017


On Tuesday, 21 March 2017 at 22:51:41 UTC, thorstein wrote:
> Thanks to all, I got it!
>
> I created a new dub package and copied my code there. Compiles. 
> So I guess I get the rest working as well.
>
> Still will have to figure out later the procedure to do the 
> same for a VisualD project, if it is possible.
>
> Thorstein

As togrue said, you can generate a VisualD project from the dub 
project you created.

Normally, you could also just run 'dub build' on any library that 
has a dub package and copy the resulting binary to a place where 
you can configure VisualD to find it (and do that for 
debug/release builds and, if you need both, 32-/64-bit). 
Unfortunately, mir-algorithm has a target type of 
"sourceLibrary". It needs to be "library", "staticLibrary", or 
"dynamicLibrary", in order to build by itself. Using 
"sourceLibrary" means it can only be built as a dependency to 
another project.

BTW, here's a tip:

dub fetch --cache=local mir-algorithm

Using --cache=local will put the package in the current directory 
instead of the AppData path. When you aren't using dub to manage 
your own projects, that makes it easier to deal with (e.g. cd 
C:\dev\dub\package-name). You can cd to the package's root 
directory and run dub build, then add the path to the resultant 
library to your IDE, or copy the library to a common path.


More information about the Digitalmars-d-learn mailing list