Hello,
I used the following steps to build the example raylib-d
program. (https://github.com/schveiguy/raylib-d#example)
Install Raylib (Ubuntu/Debian)
sudo apt install libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev
cd /tmp
git clone https://github.com/raysan5/raylib.git raylib
cd raylib
mkdir build && cd build
cmake -DBUILD_SHARED_LIBS=ON ..
make -j2
sudo make install
sudo reboot now
Dlang Raylib API
- Install Dlang
- Navigate to project root directory
mkdir source
touch source/app.d
- Code: https://github.com/schveiguy/raylib-d#example
dub add raylib-d
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.
- Have I missed an install step?
- What are my next troubleshooting steps?