I have a very simple program D (pk.d):
import std.stdio;
import SDL;
int main(string[] args) {
writefln("Hello world");
if (SDL_Init( SDL_INIT_VIDEO ) < 0) {
writefln("Unable to init SDL");
return 1;
}
return 0;
}
I have a very simple make script (here I am here, but the Windows D compiler comes with a bash interpreter):
DMD=dmd
DFLAGS=-I./lib/SDL
$(DMD) pk $(DFLAGS)
pk
But when I create it, I get Error 42: Symbol Undefined _SDL_Init
He managed to import the SDL in order, and he finds SDL_INIT_VIDEO just fine. I went ahead and checked in SDL.d and found that there is a definition for SDL_Init: int SDL_Init(Uint32 flags);. I canβt figure it out. This is the first non-STL library I imported with D, so hopefully my error is obvious, can anyone see it?
source
share