[SDL] Using SDL with D

Brad braddabug at comcast.net
Sat Feb 17 15:29:39 PST 2007


I'm trying to get a sample SDL app written in D to build. Right now it 
just has an empty main() function and import SDL;. Whenever I try to 
build with gdc, like this:

gdc -I"path\to\sdl\.d\files" main.d -lmingw32 -lSDL -lmwindows

I get this error:

undefined reference to `_D3SDL12__ModuleInfoZ'

I'm using the SDL module files from here: 
http://int19h.tamb.ru/files.html and the latest 1.2.11 MinGW version of 
the SDL libraries, which I figured would be enough to get my simple 
bare-bones app to build. Adding -lSDLmain doesn't help either, and I'm 
not sure it belongs since this is D.

Anyone ever built an SDL app using D and gdc? Any ideas what's wrong?


More information about the SDL mailing list