raylib LoadTexture Mismatch between
Decabytes
mycontributiontotheworld at gmail.com
Fri Feb 19 22:26:38 UTC 2021
Dlang and curly brace language noob here. I'm trying to work with
the raylib-d library. I downloaded raylib-d using dub, and I
installed raylib with my package manager on Manjaro. I'm getting
a mismatch in the arguments I'm passing to LoadTexture.
source/app.d(7,32): Error: function
raylib.LoadTexture(const(char)* fileName) is not callable using
argument types (string)
In the raylib-d docs/cheatsheet it says LoadTexture uses a string
as an argument.The original raylib docs/cheatsheet says it's a
const(char)* value. So it seems I'm using the C version instead
of the D version? The relevant section of the code below is
import raylib;
void main()
{
InitWindow(800, 600, "Hello, Raylib-D!");
string fname = "assets/tile_022.png";
Texture2D player = LoadTexture(fname);
while (!WindowShouldClose()){
...
}
{
"authors": [
"Me"
],
"copyright": "Copyright © 2021, Me",
"dependencies": {
"raylib-d": "~>3.0.3"
},
"description": "A minimal D application.",
"libs": [
"raylib"
],
"license": "proprietary",
"name": "raylib_test"
}
Does anyone know why this is happening?
More information about the Digitalmars-d-learn
mailing list