Building Example Project with `raylib-d`

jwatson-CO-edu real.name at colorado.edu
Wed Sep 14 20:17:01 UTC 2022


Hello,
I used the following steps to build the example `raylib-d` 
program. (https://github.com/schveiguy/raylib-d#example)

### Install Raylib (Ubuntu/Debian)
1. `sudo apt install libasound2-dev mesa-common-dev libx11-dev 
libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev`
1. `cd /tmp`
1. `git clone https://github.com/raysan5/raylib.git raylib`
1. `cd raylib`
1. `mkdir build && cd build`
1. `cmake -DBUILD_SHARED_LIBS=ON ..`
1. `make -j2`
1. `sudo make install`
1. `sudo reboot now`

### Dlang Raylib API
1. Install Dlang
1. Navigate to project root directory
1. `mkdir source`
1. `touch source/app.d`
1. Code: https://github.com/schveiguy/raylib-d#example
1. `dub add raylib-d`
1. `dub build`

### Errors encountered
```
Performing "debug" build using /usr/bin/dmd for x86_64.
00_test ~master: building configuration "application"...
Linking...
/usr/bin/ld: 
.dub/build/application-debug-linux.posix-x86_64-dmd_v2.100.0-533EF886932B3BC59F9F09D93C0642F5/00_test.o: in function `_D6raylib7binding21validateRaylibBindingFNbNiZv':
/home/james/.dub/packages/raylib-d-4.2.0/raylib-d/source/raylib/binding.d:26: undefined reference to `raylibVersion'
/usr/bin/ld: 
/home/james/.dub/packages/raylib-d-4.2.0/raylib-d/source/raylib/binding.d:26: undefined reference to `raylibVersion'
collect2: error: ld returned 1 exit status
Error: linker exited with status 1
/usr/bin/dmd failed with exit code 1.
```

### Questions
There appears to be a linker problem with regards to missing 
symbols, but normally I would expect `make install` to place the 
shared libs in their proper places.
1. Have I missed an install step?
1. What are my next troubleshooting steps?


More information about the Digitalmars-d-learn mailing list