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

Decabytes mycontributiontotheworld at gmail.com
Sun Oct 16 11:09:31 UTC 2022


I'm trying to set up Visual Studio 2022 with Visual D, and I'm 
running into issues trying to get my project to build correctly. 
It's a double whammy because I've never used Visual Studio before 
(Just an Emacs Guy), but I need to debug my D programming and 
according to the 
[documentation](https://wiki.dlang.org/Debuggers) this is my only 
option on Windows.


  I'm confused at what/where exactly D expect files to be for them 
to considered "installed". [I'm using 
raylib-d](https://github.com/schveiguy/raylib-d).

1. My "compile and debug" and "compile and run" options both 
include "-lraylib" I've also tried just "-lib raylib"

2. I have the [raylib 
source](https://github.com/schveiguy/raylib-d/tree/master/source/raylib) file located in my C:\D\dmd2\src

3. I have "-I%@P%\..\..\src\raylib" in my sc.ini file located at 
C:\D\dmd2\windows\bin.

4. I even have raylib.dll and raylib.lib in the same directory as 
my d source file.

Despite this when I hit the Start button in Visual Studio I get 
this error

```
Building x64\Debug\chip8.exe...
chip8.d(4): Error: unable to read module `raylib`
chip8.d(4):        Expected 'raylib.d' or 'raylib\package.d' in 
one of the following import paths:
import path[0] = C:\D\dmd2\windows\bin\..\..\src\phobos
import path[1] = C:\D\dmd2\windows\bin\..\..\src\druntime\import
import path[2] = C:\D\dmd2\windows\bin\..\..\src\gtkd
import path[3] = C:\D\dmd2\windows\bin\..\..\src\raylib
```
But I do have a package.d located in  
C:\D\dmd2\src\raylib\package.d. Does anyone know what I did wrong?


More information about the Digitalmars-d-learn mailing list