StijnH
Joined: 12 Sep 2010 Posts: 4
|
Posted: Mon Sep 13, 2010 2:49 pm Post subject: Error 42 when using Derelict2 (Solved) |
|
|
Edit
Thanks to SirAlaran for providing the solution. The linker options below are Linux specific, this is the correct command for Windows
Code: | dmd test.d DerelictSDL.lib DerelictUtil.lib |
-----
Hello,
I have build Derelict2 with the provided VS solution files, with the following directory structure as the result:
Code: | Derelict2
|-DerelictAL
|-...
|-import
|-derelict
|-devil
|-il.di
|-*.di
|-...
|-lib
|-DerelictAL_dbg.lib
|-*.lib |
I have added the following to sc.ini's DFLAGS
Quote: | "-I%@P%\..\..\src\ext\Derelict2\import" |
When trying the example from http://www.dsource.org/forums/viewtopic.php?t=5603#25483 I get the following output
Quote: | dmd test.d -L-ldl -L-lDerelictSDL -L-lDerelictUtil
OPTLINK (R) for Win32 Release 8.00.2
Copyright (C) Digital Mars 1989-2009 All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
OPTLINK : Warning 9: Unknown Option : LDL
OPTLINK : Warning 9: Unknown Option : LDERELICTSDL
OPTLINK : Warning 9: Unknown Option : LDERELICTUTIL
test.obj(test)
Error 42: Symbol Undefined _D8derelict3sdl3sdl11DerelictSDLC8derelict3sdl3sdl17
DerelictSDLLoader
test.obj(test)
Error 42: Symbol Undefined _D8derelict3sdl3sdl12__ModuleInfoZ
--- errorlevel 2 |
I have tried building the same code with Visual D and don't get the warnings, but still get the two errors.
I'm used to working with .NET so this is fairly new stuff to me, maybe I'm making an obvious mistake here but I'm lost so any help is appreciated. |
|