How do I correctly install packages for use with Visual Studio?

Mike Parker aldacron at gmail.com
Sun Oct 16 11:47:32 UTC 2022


On Sunday, 16 October 2022 at 11:09:31 UTC, Decabytes wrote:

>
>  I'm confused at what/where exactly D expect files to be for 
> them to considered "installed".

D doesn't expect them to be anywhere. By default, the compiler 
will search relative to the current working directory, on any 
paths configured in dmd's config file, and on any paths you (or 
your IDE) give it via `-I` on the command line.

I strongly recommend against keeping libraries in the dmd source 
directory. You'll have to copy them over again on every new 
compiler install.

If Visual D doesn't yet support dub (I've not used it in a long 
while, so I don't know), then it's probably best to set up a 
common directory somewhere on your system. Just make sure not to 
put the package directory (e.g., in src/raylib, raylib is the 
package directory) on the import path, but the root source 
directory.

You'll probably want to keep any compiled library binaries on a 
common path, too, so that you can configure that in the IDE 
settings.


More information about the Digitalmars-d-learn mailing list