Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8837539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T09:45:06+00:00 2026-06-14T09:45:06+00:00

I have problems compiling a D program that uses SDL using a makefile called

  • 0

I have problems compiling a D program that uses SDL using a makefile called from DOS, where SDL is supposed to be wrapped by Derelict. In addition, if I use a pragma inside the test program for linking, it tells me the lib file has error 43, not a valid library file.

How to make it link, and am I using the wrong stack (Visual C/C++) ? I think not because it is looking for lib files.

test program

//pragma(lib, "D:\\Development\\SDL-1.2.15\\lib\\x86\\SDL.lib");
import derelict.sdl.sdl;

void main()
{
    DerelictSDL.load();

    // now you can call SDL functions
}

makefile

DMD = dmd
WINDRES = windres.exe
LDFLAGS = -O2 -s `sdl-config --libs`
DFLAGS =
RM   = rm -f
#OBJS = main.o graphic.o grid.o node.o appicon.opc
SRCS = toh_fractal.d
# graphic.d grid.d node.d appicon.opc
PROG = toh_fractal
DERELICT = D:\\Development\\Derelict2
INCLUDE_DERELICT = $(DERELICT)\\import
LIB_DERELICT = DerelictSDL 
LIB_SDL = SDL
#$(DERELICT)\\lib\\
VERS = 0.1.1

.PHONY: clean distclean
all: $(PROG)

$(PROG): $(SRCS)
    $(DMD) $(DFLAGS) $(PROG) -I$(INCLUDE_DERELICT) appicon.res -L$(LIB_DERELICT) -L$(LIB_SDL) 

appicon.res: appicon.rc sierpinski.ico
    windres -i appicon.rc -o appicon.res

distclean:
    $(RM) *~ $(OBJS) appicon.opc stdout.txt stderr.txt

clean:
    $(RM) *~ $(OBJS) $(PROG) appicon.opc stdout.txt stderr.txt

makefile output

C:\D\D_fractals_of_hanoi>make all
dmd  toh_fractal -ID:\\Development\\Derelict2\\import appicon.res -LDerelictSDL  -LSDL
OPTLINK (R) for Win32  Release 8.00.12
Copyright (C) Digital Mars 1989-2010  All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
OPTLINK : Warning 9: Unknown Option : NOIDERELICTSDLSDL
toh_fractal.obj(toh_fractal)
 Error 42: Symbol Undefined _D8derelict3sdl3sdl12__ModuleInfoZ
toh_fractal.obj(toh_fractal)
 Error 42: Symbol Undefined         _D8derelict3sdl3sdl11DerelictSDLC8derelict3sdl3sdl17DerelictSDLLoader
--- errorlevel 2
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T09:45:08+00:00Added an answer on June 14, 2026 at 9:45 am

    Derelict is meant ot be used with dynamic linking. You should put the right .so or .dll in your application directory and Derelict will find it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm have horrendous problems trying to get a JOGL program compiling using Netbeans 6.9.
I have a problem compiling a program I made in BASIC. It's a DOS
So I have a .cpp file that uses OpenCV. I've been having some problems
I have a program that uses _mm_crc32_u64 . I include the header file smmintrin.h
Ok, what we have: Program written on C which compiling and running without problems
I have heard that setting the --prefix=PREFIX option when compiling PHP on linux will
I'm coding a simple SDL program with VC10. The problem that I am having
I have a class library that uses System.Web.Mvc version 3 and System.Web.WebPages version 1.
I am having two problems regarding compiling and running an Eclipse java project from
I have a C program that link the ssl library( md5.h ) : #if

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.