Compiling Derelick (D)

I spent hours trying to do this without success, so I am here.

I am trying to compile this (click) program to test my Derelict installation without success.

I am using the Arch Linux distribution. I tried with several commands and various DMD2 (and GDC) packages from AUR (community-driven repository). I also tried installing Derelict with either DSSS or AUR.

One command line option:

gdc -I/usr/include/d2/ -L -ldl -L -lDerelictGL -L -lDerelictGLUL -L -lDerelictSDL -L -lDerelictUtil *.d -ofexample 

and the other:

 dmd2 -I/usr/include/d2 main 

They both throw a lot of ugly linker errors (different).

In directories where the files are supposedly correct:

 libraries: /usr/lib/libDerelict*.a "headers": /usr/include/d2/derelict/<folders of modules> 

I would be happy to provide you with any additional information.

Thanks,
Nanthiel

EDIT

When I ran this:

 dmd -I/usr/include/d2 main.d Display.d -ofexample -L-lDerelictGL -L-lDerelictGLU -L-lDerelictSDL -L-lDerelictUtil -L-ldl 

it works. However, only with GDC. Not with DMD2. I do not know why.

GDC options: GCC (4.5.1) gdc (0.30) dmd (2.056) DMD2 version: I donโ€™t know how to get this.: / But it should be the newest as it is from git.

In addition, Derelict wants Open GL 3.0 to support custom shaders when 2.0 should be enough. = /

EDIT 2

Here are the linker errors, sorry for the slow update.

  dmd -I/usr/include/d2 main.d Display.d -ofexample -L-lDerelictGL -L-lDerelictGLU -L-lDerelictSDL -L-lDerelictUtil -L-ldl /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(gl.o): In function `_D8derelict6opengl2gl16DerelictGLLoader17getExtensionStateMFAyaZE8derelict6opengl7gltypes16GLExtensionState': (.text+0x38f9): undefined reference to `_d_throw' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(gl.o): In function `_D8derelict6opengl2gl16DerelictGLLoader17isExtensionLoadedMFAyaZb': (.text+0x395d): undefined reference to `_d_throw' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(gl.o): In function `_D8derelict6opengl2gl16DerelictGLLoader20isExtensionSupportedMFAyaZb': (.text+0x39c9): undefined reference to `_d_throw' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(gl.o): In function `_D8derelict6opengl2gl16DerelictGLLoader14loadExtensionsMFZv': (.text+0x3a6d): undefined reference to `_d_throw' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(gl.o): In function `_D8derelict6opengl2gl16DerelictGLLoader18loadModernVersionsMFE8derelict6opengl2gl9GLVersionZE8derelict6opengl2gl9GLVersion': (.text+0x3de0): undefined reference to `_d_throw' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(gl.o):(.text+0x4889): more undefined references to `_d_throw' follow /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D6object70__T16AssociativeArrayTAyaTE8derelict6opengl7gltypes16GLExtensionStateZ16AssociativeArray3dupMFNdZHAyaE8derelict6opengl7gltypes16GLExtensionState17__foreachbody1277MFKAyaKE8derelict6opengl7gltypes16GLExtensionStateZi': (.text+0x5b): undefined reference to `_aaGetp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D8derelict6opengl9extloader23getLoadedExtensionNamesFZAAya': (.text+0x149): undefined reference to `_aaGetRvaluep' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D8derelict6opengl9extloader23getLoadedExtensionNamesFZAAya': (.text+0x180): undefined reference to `_d_arrayappendcTp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D8derelict6opengl9extloader26getNotLoadedExtensionNamesFZAAya': (.text+0x298): undefined reference to `_d_arrayappendcTp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D8derelict6opengl9extloader26getNotLoadedExtensionNamesFZAAya': (.text+0x2ee): undefined reference to `_aaGetRvaluep' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D8derelict6opengl9extloader26getNotLoadedExtensionNamesFZAAya': (.text+0x35c): undefined reference to `_d_arrayappendcTp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D8derelict6opengl9extloader11extGetStateFAyaZE8derelict6opengl7gltypes16GLExtensionState': (.text+0x46f): undefined reference to `_aaInp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D8derelict6opengl9extloader13extLoadCommonFZv': (.text+0x126f2): undefined reference to `_aaGetp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D8derelict6opengl9extloader13extLoadCommonFZv': (.text+0x1272d): undefined reference to `_aaGetp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D8derelict6opengl9extloader13extLoadCommonFZv': (.text+0x12780): undefined reference to `_aaGetp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D8derelict6opengl9extloader13extLoadCommonFZv': (.text+0x127f4): undefined reference to `_aaGetp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D8derelict6opengl9extloader13extLoadCommonFZv': (.text+0x12840): undefined reference to `_aaGetp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o):(.text+0x1288c): more undefined references to `_aaGetp' follow /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D6object70__T16AssociativeArrayTAyaTE8derelict6opengl7gltypes16GLExtensionStateZ16AssociativeArray3getMFAyaLE8derelict6opengl7gltypes16GLExtensionStateZE8derelict6opengl7gltypes16GLExtensionState': (.text._D6object70__T16AssociativeArrayTAyaTE8derelict6opengl7gltypes16GLExtensionStateZ16AssociativeArray3getMFAyaLE8derelict6opengl7gltypes16GLExtensionStateZE8derelict6opengl7gltypes16GLExtensionState[_D6object70__T16AssociativeArrayTAyaTE8derelict6opengl7gltypes16GLExtensionStateZ16AssociativeArray3getMFAyaLE8derelict6opengl7gltypes16GLExtensionStateZE8derelict6opengl7gltypes16GLExtensionState]+0x2a): undefined reference to `_aaInp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictUtil.a(exception.o): In function `_D8derelict4util9exception22SharedLibLoadException8throwNewFxAAaxAAaZv': (.text+0x1fe): undefined reference to `_d_throw' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictUtil.a(exception.o): In function `_D8derelict4util9exception28Derelict_HandleMissingSymbolFAyaAyaZv': (.text+0x4e2): undefined reference to `_d_throw' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictUtil.a(sharedlib.o): In function `_D8derelict4util9sharedlib9SharedLib4loadMFAAyaZv': (.text+0x176): undefined reference to `_d_arrayappendcTp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictUtil.a(sharedlib.o): In function `_D8derelict4util9sharedlib9SharedLib4loadMFAAyaZv': (.text+0x1d8): undefined reference to `_d_arrayappendcTp' collect2: ld returned 1 exit status --- errorlevel 1 :  dmd -I/usr/include/d2 main.d Display.d -ofexample -L-lDerelictGL -L-lDerelictGLU -L-lDerelictSDL -L-lDerelictUtil -L-ldl /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(gl.o): In function `_D8derelict6opengl2gl16DerelictGLLoader17getExtensionStateMFAyaZE8derelict6opengl7gltypes16GLExtensionState': (.text+0x38f9): undefined reference to `_d_throw' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(gl.o): In function `_D8derelict6opengl2gl16DerelictGLLoader17isExtensionLoadedMFAyaZb': (.text+0x395d): undefined reference to `_d_throw' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(gl.o): In function `_D8derelict6opengl2gl16DerelictGLLoader20isExtensionSupportedMFAyaZb': (.text+0x39c9): undefined reference to `_d_throw' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(gl.o): In function `_D8derelict6opengl2gl16DerelictGLLoader14loadExtensionsMFZv': (.text+0x3a6d): undefined reference to `_d_throw' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(gl.o): In function `_D8derelict6opengl2gl16DerelictGLLoader18loadModernVersionsMFE8derelict6opengl2gl9GLVersionZE8derelict6opengl2gl9GLVersion': (.text+0x3de0): undefined reference to `_d_throw' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(gl.o):(.text+0x4889): more undefined references to `_d_throw' follow /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D6object70__T16AssociativeArrayTAyaTE8derelict6opengl7gltypes16GLExtensionStateZ16AssociativeArray3dupMFNdZHAyaE8derelict6opengl7gltypes16GLExtensionState17__foreachbody1277MFKAyaKE8derelict6opengl7gltypes16GLExtensionStateZi': (.text+0x5b): undefined reference to `_aaGetp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D8derelict6opengl9extloader23getLoadedExtensionNamesFZAAya': (.text+0x149): undefined reference to `_aaGetRvaluep' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D8derelict6opengl9extloader23getLoadedExtensionNamesFZAAya': (.text+0x180): undefined reference to `_d_arrayappendcTp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D8derelict6opengl9extloader26getNotLoadedExtensionNamesFZAAya': (.text+0x298): undefined reference to `_d_arrayappendcTp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D8derelict6opengl9extloader26getNotLoadedExtensionNamesFZAAya': (.text+0x2ee): undefined reference to `_aaGetRvaluep' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D8derelict6opengl9extloader26getNotLoadedExtensionNamesFZAAya': (.text+0x35c): undefined reference to `_d_arrayappendcTp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D8derelict6opengl9extloader11extGetStateFAyaZE8derelict6opengl7gltypes16GLExtensionState': (.text+0x46f): undefined reference to `_aaInp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D8derelict6opengl9extloader13extLoadCommonFZv': (.text+0x126f2): undefined reference to `_aaGetp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D8derelict6opengl9extloader13extLoadCommonFZv': (.text+0x1272d): undefined reference to `_aaGetp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D8derelict6opengl9extloader13extLoadCommonFZv': (.text+0x12780): undefined reference to `_aaGetp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D8derelict6opengl9extloader13extLoadCommonFZv': (.text+0x127f4): undefined reference to `_aaGetp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D8derelict6opengl9extloader13extLoadCommonFZv': (.text+0x12840): undefined reference to `_aaGetp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o):(.text+0x1288c): more undefined references to `_aaGetp' follow /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D6object70__T16AssociativeArrayTAyaTE8derelict6opengl7gltypes16GLExtensionStateZ16AssociativeArray3getMFAyaLE8derelict6opengl7gltypes16GLExtensionStateZE8derelict6opengl7gltypes16GLExtensionState': (.text._D6object70__T16AssociativeArrayTAyaTE8derelict6opengl7gltypes16GLExtensionStateZ16AssociativeArray3getMFAyaLE8derelict6opengl7gltypes16GLExtensionStateZE8derelict6opengl7gltypes16GLExtensionState[_D6object70__T16AssociativeArrayTAyaTE8derelict6opengl7gltypes16GLExtensionStateZ16AssociativeArray3getMFAyaLE8derelict6opengl7gltypes16GLExtensionStateZE8derelict6opengl7gltypes16GLExtensionState]+0x2a): undefined reference to `_aaInp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictUtil.a(exception.o): In function `_D8derelict4util9exception22SharedLibLoadException8throwNewFxAAaxAAaZv': (.text+0x1fe): undefined reference to `_d_throw' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictUtil.a(exception.o): In function `_D8derelict4util9exception28Derelict_HandleMissingSymbolFAyaAyaZv': (.text+0x4e2): undefined reference to `_d_throw' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictUtil.a(sharedlib.o): In function `_D8derelict4util9sharedlib9SharedLib4loadMFAAyaZv': (.text+0x176): undefined reference to `_d_arrayappendcTp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictUtil.a(sharedlib.o): In function `_D8derelict4util9sharedlib9SharedLib4loadMFAAyaZv': (.text+0x1d8): undefined reference to `_d_arrayappendcTp' collect2: ld returned 1 exit status --- errorlevel 1 :  dmd -I/usr/include/d2 main.d Display.d -ofexample -L-lDerelictGL -L-lDerelictGLU -L-lDerelictSDL -L-lDerelictUtil -L-ldl /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(gl.o): In function `_D8derelict6opengl2gl16DerelictGLLoader17getExtensionStateMFAyaZE8derelict6opengl7gltypes16GLExtensionState': (.text+0x38f9): undefined reference to `_d_throw' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(gl.o): In function `_D8derelict6opengl2gl16DerelictGLLoader17isExtensionLoadedMFAyaZb': (.text+0x395d): undefined reference to `_d_throw' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(gl.o): In function `_D8derelict6opengl2gl16DerelictGLLoader20isExtensionSupportedMFAyaZb': (.text+0x39c9): undefined reference to `_d_throw' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(gl.o): In function `_D8derelict6opengl2gl16DerelictGLLoader14loadExtensionsMFZv': (.text+0x3a6d): undefined reference to `_d_throw' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(gl.o): In function `_D8derelict6opengl2gl16DerelictGLLoader18loadModernVersionsMFE8derelict6opengl2gl9GLVersionZE8derelict6opengl2gl9GLVersion': (.text+0x3de0): undefined reference to `_d_throw' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(gl.o):(.text+0x4889): more undefined references to `_d_throw' follow /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D6object70__T16AssociativeArrayTAyaTE8derelict6opengl7gltypes16GLExtensionStateZ16AssociativeArray3dupMFNdZHAyaE8derelict6opengl7gltypes16GLExtensionState17__foreachbody1277MFKAyaKE8derelict6opengl7gltypes16GLExtensionStateZi': (.text+0x5b): undefined reference to `_aaGetp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D8derelict6opengl9extloader23getLoadedExtensionNamesFZAAya': (.text+0x149): undefined reference to `_aaGetRvaluep' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D8derelict6opengl9extloader23getLoadedExtensionNamesFZAAya': (.text+0x180): undefined reference to `_d_arrayappendcTp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D8derelict6opengl9extloader26getNotLoadedExtensionNamesFZAAya': (.text+0x298): undefined reference to `_d_arrayappendcTp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D8derelict6opengl9extloader26getNotLoadedExtensionNamesFZAAya': (.text+0x2ee): undefined reference to `_aaGetRvaluep' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D8derelict6opengl9extloader26getNotLoadedExtensionNamesFZAAya': (.text+0x35c): undefined reference to `_d_arrayappendcTp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D8derelict6opengl9extloader11extGetStateFAyaZE8derelict6opengl7gltypes16GLExtensionState': (.text+0x46f): undefined reference to `_aaInp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D8derelict6opengl9extloader13extLoadCommonFZv': (.text+0x126f2): undefined reference to `_aaGetp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D8derelict6opengl9extloader13extLoadCommonFZv': (.text+0x1272d): undefined reference to `_aaGetp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D8derelict6opengl9extloader13extLoadCommonFZv': (.text+0x12780): undefined reference to `_aaGetp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D8derelict6opengl9extloader13extLoadCommonFZv': (.text+0x127f4): undefined reference to `_aaGetp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D8derelict6opengl9extloader13extLoadCommonFZv': (.text+0x12840): undefined reference to `_aaGetp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o):(.text+0x1288c): more undefined references to `_aaGetp' follow /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D6object70__T16AssociativeArrayTAyaTE8derelict6opengl7gltypes16GLExtensionStateZ16AssociativeArray3getMFAyaLE8derelict6opengl7gltypes16GLExtensionStateZE8derelict6opengl7gltypes16GLExtensionState': (.text._D6object70__T16AssociativeArrayTAyaTE8derelict6opengl7gltypes16GLExtensionStateZ16AssociativeArray3getMFAyaLE8derelict6opengl7gltypes16GLExtensionStateZE8derelict6opengl7gltypes16GLExtensionState[_D6object70__T16AssociativeArrayTAyaTE8derelict6opengl7gltypes16GLExtensionStateZ16AssociativeArray3getMFAyaLE8derelict6opengl7gltypes16GLExtensionStateZE8derelict6opengl7gltypes16GLExtensionState]+0x2a): undefined reference to `_aaInp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictUtil.a(exception.o): In function `_D8derelict4util9exception22SharedLibLoadException8throwNewFxAAaxAAaZv': (.text+0x1fe): undefined reference to `_d_throw' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictUtil.a(exception.o): In function `_D8derelict4util9exception28Derelict_HandleMissingSymbolFAyaAyaZv': (.text+0x4e2): undefined reference to `_d_throw' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictUtil.a(sharedlib.o): In function `_D8derelict4util9sharedlib9SharedLib4loadMFAAyaZv': (.text+0x176): undefined reference to `_d_arrayappendcTp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictUtil.a(sharedlib.o): In function `_D8derelict4util9sharedlib9SharedLib4loadMFAAyaZv': (.text+0x1d8): undefined reference to `_d_arrayappendcTp' collect2: ld returned 1 exit status --- errorlevel 1 : undefined reference to `_aaInp '  dmd -I/usr/include/d2 main.d Display.d -ofexample -L-lDerelictGL -L-lDerelictGLU -L-lDerelictSDL -L-lDerelictUtil -L-ldl /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(gl.o): In function `_D8derelict6opengl2gl16DerelictGLLoader17getExtensionStateMFAyaZE8derelict6opengl7gltypes16GLExtensionState': (.text+0x38f9): undefined reference to `_d_throw' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(gl.o): In function `_D8derelict6opengl2gl16DerelictGLLoader17isExtensionLoadedMFAyaZb': (.text+0x395d): undefined reference to `_d_throw' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(gl.o): In function `_D8derelict6opengl2gl16DerelictGLLoader20isExtensionSupportedMFAyaZb': (.text+0x39c9): undefined reference to `_d_throw' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(gl.o): In function `_D8derelict6opengl2gl16DerelictGLLoader14loadExtensionsMFZv': (.text+0x3a6d): undefined reference to `_d_throw' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(gl.o): In function `_D8derelict6opengl2gl16DerelictGLLoader18loadModernVersionsMFE8derelict6opengl2gl9GLVersionZE8derelict6opengl2gl9GLVersion': (.text+0x3de0): undefined reference to `_d_throw' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(gl.o):(.text+0x4889): more undefined references to `_d_throw' follow /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D6object70__T16AssociativeArrayTAyaTE8derelict6opengl7gltypes16GLExtensionStateZ16AssociativeArray3dupMFNdZHAyaE8derelict6opengl7gltypes16GLExtensionState17__foreachbody1277MFKAyaKE8derelict6opengl7gltypes16GLExtensionStateZi': (.text+0x5b): undefined reference to `_aaGetp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D8derelict6opengl9extloader23getLoadedExtensionNamesFZAAya': (.text+0x149): undefined reference to `_aaGetRvaluep' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D8derelict6opengl9extloader23getLoadedExtensionNamesFZAAya': (.text+0x180): undefined reference to `_d_arrayappendcTp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D8derelict6opengl9extloader26getNotLoadedExtensionNamesFZAAya': (.text+0x298): undefined reference to `_d_arrayappendcTp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D8derelict6opengl9extloader26getNotLoadedExtensionNamesFZAAya': (.text+0x2ee): undefined reference to `_aaGetRvaluep' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D8derelict6opengl9extloader26getNotLoadedExtensionNamesFZAAya': (.text+0x35c): undefined reference to `_d_arrayappendcTp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D8derelict6opengl9extloader11extGetStateFAyaZE8derelict6opengl7gltypes16GLExtensionState': (.text+0x46f): undefined reference to `_aaInp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D8derelict6opengl9extloader13extLoadCommonFZv': (.text+0x126f2): undefined reference to `_aaGetp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D8derelict6opengl9extloader13extLoadCommonFZv': (.text+0x1272d): undefined reference to `_aaGetp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D8derelict6opengl9extloader13extLoadCommonFZv': (.text+0x12780): undefined reference to `_aaGetp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D8derelict6opengl9extloader13extLoadCommonFZv': (.text+0x127f4): undefined reference to `_aaGetp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D8derelict6opengl9extloader13extLoadCommonFZv': (.text+0x12840): undefined reference to `_aaGetp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o):(.text+0x1288c): more undefined references to `_aaGetp' follow /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictGL.a(extloader.o): In function `_D6object70__T16AssociativeArrayTAyaTE8derelict6opengl7gltypes16GLExtensionStateZ16AssociativeArray3getMFAyaLE8derelict6opengl7gltypes16GLExtensionStateZE8derelict6opengl7gltypes16GLExtensionState': (.text._D6object70__T16AssociativeArrayTAyaTE8derelict6opengl7gltypes16GLExtensionStateZ16AssociativeArray3getMFAyaLE8derelict6opengl7gltypes16GLExtensionStateZE8derelict6opengl7gltypes16GLExtensionState[_D6object70__T16AssociativeArrayTAyaTE8derelict6opengl7gltypes16GLExtensionStateZ16AssociativeArray3getMFAyaLE8derelict6opengl7gltypes16GLExtensionStateZE8derelict6opengl7gltypes16GLExtensionState]+0x2a): undefined reference to `_aaInp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictUtil.a(exception.o): In function `_D8derelict4util9exception22SharedLibLoadException8throwNewFxAAaxAAaZv': (.text+0x1fe): undefined reference to `_d_throw' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictUtil.a(exception.o): In function `_D8derelict4util9exception28Derelict_HandleMissingSymbolFAyaAyaZv': (.text+0x4e2): undefined reference to `_d_throw' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictUtil.a(sharedlib.o): In function `_D8derelict4util9sharedlib9SharedLib4loadMFAAyaZv': (.text+0x176): undefined reference to `_d_arrayappendcTp' /usr/lib/gcc/i686-pc-linux-gnu/4.6.2/../../../libDerelictUtil.a(sharedlib.o): In function `_D8derelict4util9sharedlib9SharedLib4loadMFAAyaZv': (.text+0x1d8): undefined reference to `_d_arrayappendcTp' collect2: ld returned 1 exit status --- errorlevel 1 

EDIT 3

I tried reinstalling everything (checked Derelict2 from SVN, reinstalled DMD2, the dmd2-complete package from AUR) and recompiled Derelict2 again this time using DMD2. It worked. And that too all compiles well! I do not know what's happening.

If anyone could tell me what is the procedure for marking it as โ€œresolvedโ€ or something else?

Thanks,
Nanthiel

+4
source share
1 answer

In accordance with Timโ€™s request, I will describe how to get an example program ( here ) for compilation. Note that this applies to the Arch Linux distribution and may not be the same elsewhere, but should be pretty similar.

Basically, just call dmd with -I/usr/include/d2 -L-lDerelictGL -L-lDerelictGLU -L-lDerelictSDL -L-lDerelictUtil -L-ldl . Add other Derelict modules as needed (for example, -L-lDerelictSDLttf for SDL_ttf ).

Please note that the sample program on the site has a compilation error (easy to fix), and for D2 with the Phobos library you need to replace the Tango tostringz module with std.string in Display.d .

I installed DMD from Arch and Derelict archives from AUR. Since DMD has been added to the official repository, I suspect that users will have fewer problems for everything to work.

0
source

Source: https://habr.com/ru/post/1385990/


All Articles