View previous topic :: View next topic |
Author |
Message |
bioinfornatics
Joined: 22 Jun 2010 Posts: 90
|
Posted: Mon Sep 13, 2010 4:34 pm Post subject: Build fail |
|
|
When i try compile this code:
Code: | import derelict.opengl.gl;
import tango.io.Stdout;
void main(){
try{
DerelictGL.load();
Stdout("Successfully loaded the OpenGL shared library.").nl;
} catch (Exception e) {
Stdout("Could not load the OpenGL shared library.").nl;
}
} |
Code: | $ ldc -w -op /usr/include/d/derelict/opengl/glx.di example.d
Error: cannot write native asm: Error opening output file '/usr/include/d/derelict/opengl/glx.s' |
i need help for fix it thanks |
|
Back to top |
|
|
bioinfornatics
Joined: 22 Jun 2010 Posts: 90
|
Posted: Mon Sep 13, 2010 4:47 pm Post subject: |
|
|
Code: | $ ldc -w -L -ldl -I /usr/include/d/tango/ -I /usr/include/d/ -I /usr/include/d/derelict/opengl/ example.d -of example
example.o: In function `_Dmain':
example:(.text+0x8): undefined reference to
'_D8derelict6opengl2gl10DerelictGLC8derelict6opengl2gl16DerelictGLLoader'
example.o:(.rodata+0x30): undefined reference to '_D8derelict6opengl2gl8__ModuleZ'
collect2: ld a retourné 1 code d'état d'exécution
Error: linking failed:
status: 1 |
|
|
Back to top |
|
|
michaelp
Joined: 27 Jul 2008 Posts: 114
|
Posted: Mon Sep 13, 2010 5:06 pm Post subject: |
|
|
Assuming you are using the .di files and the .lib files created by the .mak files, you need to link in the DerelictGL libs, which are DerelictGL and DerelictGLU, using -L -lDerelictGL -L -lDerelictGLU. |
|
Back to top |
|
|
bioinfornatics
Joined: 22 Jun 2010 Posts: 90
|
Posted: Tue Sep 14, 2010 4:41 am Post subject: |
|
|
thanks for your help, yes i use makefile *.di and ldc/Tango
Code: | $ ldc -w -L -ldl -I /usr/include/d/tango/ -I /usr/include/d/ -I /usr/include/d/derelict/opengl/ -L -lDerelictGL -L -lDerelictGLU example.d -of example
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader14loadExtensionsMFZv":
(.text+0x29dc): undefined reference to "_D8derelict4util9exception17DerelictException7__ClassZ"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader14loadExtensionsMFZv":
(.text+0x29ec): undefined reference to "_D8derelict4util9exception17DerelictException6__vtblZ"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader14loadExtensionsMFZv":
(.text+0x2a0b): undefined reference to "_D8derelict4util9exception17DerelictException6__initZ"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader14loadExtensionsMFZv":
(.text+0x2a15): undefined reference to "_D8derelict4util9exception17DerelictException6__initZ"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader14loadExtensionsMFZv":
(.text+0x2a20): undefined reference to "_D8derelict4util9exception17DerelictException6__initZ"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader14loadExtensionsMFZv":
(.text+0x2a2b): undefined reference to "_D8derelict4util9exception17DerelictException6__initZ"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader14loadExtensionsMFZv":
(.text+0x2a36): undefined reference to "_D8derelict4util9exception17DerelictException6__initZ"
/usr/lib64/libDerelictGL.a(gl.o):(.text+0x2a41): more undefined references to "_D8derelict4util9exception17DerelictException6__initZ" follow
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader14loadExtensionsMFZv":
(.text+0x2a5f): undefined reference to "_D8derelict4util9exception17DerelictException5_ctorMFAaZC8derelict4util9exception17DerelictException"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader20isExtensionSupportedMFAaZb":
(.text+0x2ac5): undefined reference to "_D8derelict4util9exception17DerelictException7__ClassZ"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader20isExtensionSupportedMFAaZb":
(.text+0x2ad5): undefined reference to "_D8derelict4util9exception17DerelictException6__vtblZ"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader20isExtensionSupportedMFAaZb":
(.text+0x2af4): undefined reference to "_D8derelict4util9exception17DerelictException6__initZ"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader20isExtensionSupportedMFAaZb":
(.text+0x2afe): undefined reference to "_D8derelict4util9exception17DerelictException6__initZ"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader20isExtensionSupportedMFAaZb":
(.text+0x2b09): undefined reference to "_D8derelict4util9exception17DerelictException6__initZ"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader20isExtensionSupportedMFAaZb":
(.text+0x2b14): undefined reference to "_D8derelict4util9exception17DerelictException6__initZ"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader20isExtensionSupportedMFAaZb":
(.text+0x2b1f): undefined reference to "_D8derelict4util9exception17DerelictException6__initZ"
/usr/lib64/libDerelictGL.a(gl.o):(.text+0x2b2a): more undefined references to "_D8derelict4util9exception17DerelictException6__initZ" follow
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader20isExtensionSupportedMFAaZb":
(.text+0x2b48): undefined reference to "_D8derelict4util9exception17DerelictException5_ctorMFAaZC8derelict4util9exception17DerelictException"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader17isExtensionLoadedMFAaZb":
(.text+0x2b95): undefined reference to "_D8derelict4util9exception17DerelictException7__ClassZ"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader17isExtensionLoadedMFAaZb":
(.text+0x2ba5): undefined reference to "_D8derelict4util9exception17DerelictException6__vtblZ"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader17isExtensionLoadedMFAaZb":
(.text+0x2bc4): undefined reference to "_D8derelict4util9exception17DerelictException6__initZ"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader17isExtensionLoadedMFAaZb":
(.text+0x2bce): undefined reference to "_D8derelict4util9exception17DerelictException6__initZ"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader17isExtensionLoadedMFAaZb":
(.text+0x2bd9): undefined reference to "_D8derelict4util9exception17DerelictException6__initZ"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader17isExtensionLoadedMFAaZb":
(.text+0x2be4): undefined reference to "_D8derelict4util9exception17DerelictException6__initZ"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader17isExtensionLoadedMFAaZb":
(.text+0x2bef): undefined reference to "_D8derelict4util9exception17DerelictException6__initZ"
/usr/lib64/libDerelictGL.a(gl.o):(.text+0x2bfa): more undefined references to "_D8derelict4util9exception17DerelictException6__initZ" follow
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader17isExtensionLoadedMFAaZb":
(.text+0x2c18): undefined reference to "_D8derelict4util9exception17DerelictException5_ctorMFAaZC8derelict4util9exception17DerelictException"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader17getExtensionStateMFAaZE8derelict6opengl7gltypes16GLExtensionState":
(.text+0x2c65): undefined reference to "_D8derelict4util9exception17DerelictException7__ClassZ"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader17getExtensionStateMFAaZE8derelict6opengl7gltypes16GLExtensionState":
(.text+0x2c75): undefined reference to "_D8derelict4util9exception17DerelictException6__vtblZ"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader17getExtensionStateMFAaZE8derelict6opengl7gltypes16GLExtensionState":
(.text+0x2c94): undefined reference to "_D8derelict4util9exception17DerelictException6__initZ"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader17getExtensionStateMFAaZE8derelict6opengl7gltypes16GLExtensionState":
(.text+0x2c9e): undefined reference to "_D8derelict4util9exception17DerelictException6__initZ"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader17getExtensionStateMFAaZE8derelict6opengl7gltypes16GLExtensionState":
(.text+0x2ca9): undefined reference to "_D8derelict4util9exception17DerelictException6__initZ"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader17getExtensionStateMFAaZE8derelict6opengl7gltypes16GLExtensionState":
(.text+0x2cb4): undefined reference to "_D8derelict4util9exception17DerelictException6__initZ"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader17getExtensionStateMFAaZE8derelict6opengl7gltypes16GLExtensionState":
(.text+0x2cbf): undefined reference to "_D8derelict4util9exception17DerelictException6__initZ"
/usr/lib64/libDerelictGL.a(gl.o):(.text+0x2cca): more undefined references to "_D8derelict4util9exception17DerelictException6__initZ" follow
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader17getExtensionStateMFAaZE8derelict6opengl7gltypes16GLExtensionState":
(.text+0x2ce8): undefined reference to "_D8derelict4util9exception17DerelictException5_ctorMFAaZC8derelict4util9exception17DerelictException"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader20loadExtendedVersionsMFE8derelict6opengl2gl9GLVersionZE8derelict6opengl2gl9GLVersion":
(.text+0x2d42): undefined reference to "_D8derelict4util9exception17DerelictException7__ClassZ"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader20loadExtendedVersionsMFE8derelict6opengl2gl9GLVersionZE8derelict6opengl2gl9GLVersion":
(.text+0x2d52): undefined reference to "_D8derelict4util9exception17DerelictException6__vtblZ"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader20loadExtendedVersionsMFE8derelict6opengl2gl9GLVersionZE8derelict6opengl2gl9GLVersion":
(.text+0x2d71): undefined reference to "_D8derelict4util9exception17DerelictException6__initZ"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader20loadExtendedVersionsMFE8derelict6opengl2gl9GLVersionZE8derelict6opengl2gl9GLVersion":
(.text+0x2d7b): undefined reference to "_D8derelict4util9exception17DerelictException6__initZ"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader20loadExtendedVersionsMFE8derelict6opengl2gl9GLVersionZE8derelict6opengl2gl9GLVersion":
(.text+0x2d86): undefined reference to "_D8derelict4util9exception17DerelictException6__initZ"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader20loadExtendedVersionsMFE8derelict6opengl2gl9GLVersionZE8derelict6opengl2gl9GLVersion":
(.text+0x2d91): undefined reference to "_D8derelict4util9exception17DerelictException6__initZ"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader20loadExtendedVersionsMFE8derelict6opengl2gl9GLVersionZE8derelict6opengl2gl9GLVersion":
(.text+0x2d9c): undefined reference to "_D8derelict4util9exception17DerelictException6__initZ"
/usr/lib64/libDerelictGL.a(gl.o):(.text+0x2da7): more undefined references to "_D8derelict4util9exception17DerelictException6__initZ" follow
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader20loadExtendedVersionsMFE8derelict6opengl2gl9GLVersionZE8derelict6opengl2gl9GLVersion":
(.text+0x2dc5): undefined reference to "_D8derelict4util9exception17DerelictException5_ctorMFAaZC8derelict4util9exception17DerelictException"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader20loadExtendedVersionsMFE8derelict6opengl2gl9GLVersionZE8derelict6opengl2gl9GLVersion":
(.text+0x2de9): undefined reference to "_D8derelict4util9exception17DerelictException7__ClassZ"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader20loadExtendedVersionsMFE8derelict6opengl2gl9GLVersionZE8derelict6opengl2gl9GLVersion":
(.text+0x2dfa): undefined reference to "_D8derelict4util9exception17DerelictException6__vtblZ"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader20loadExtendedVersionsMFE8derelict6opengl2gl9GLVersionZE8derelict6opengl2gl9GLVersion":
(.text+0x2e19): undefined reference to "_D8derelict4util9exception17DerelictException6__initZ"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader20loadExtendedVersionsMFE8derelict6opengl2gl9GLVersionZE8derelict6opengl2gl9GLVersion":
(.text+0x2e23): undefined reference to "_D8derelict4util9exception17DerelictException6__initZ"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader20loadExtendedVersionsMFE8derelict6opengl2gl9GLVersionZE8derelict6opengl2gl9GLVersion":
(.text+0x2e2e): undefined reference to "_D8derelict4util9exception17DerelictException6__initZ"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader20loadExtendedVersionsMFE8derelict6opengl2gl9GLVersionZE8derelict6opengl2gl9GLVersion":
(.text+0x2e39): undefined reference to "_D8derelict4util9exception17DerelictException6__initZ"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader20loadExtendedVersionsMFE8derelict6opengl2gl9GLVersionZE8derelict6opengl2gl9GLVersion":
(.text+0x2e44): undefined reference to "_D8derelict4util9exception17DerelictException6__initZ"
/usr/lib64/libDerelictGL.a(gl.o):(.text+0x2e4f): more undefined references to "_D8derelict4util9exception17DerelictException6__initZ" follow
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader20loadExtendedVersionsMFE8derelict6opengl2gl9GLVersionZE8derelict6opengl2gl9GLVersion":
(.text+0x2f14): undefined reference to "_D8derelict4util9exception17DerelictException5_ctorMFAaZC8derelict4util9exception17DerelictException"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader16bindExtendedFuncMFPPvAabZv":
(.text+0x4d6c): undefined reference to "_D8derelict4util9sharedlib9SharedLib4nameMFZAa"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader5_ctorMFZC8derelict6opengl2gl16DerelictGLLoader":
(.text+0x4de0): undefined reference to "_D8derelict4util6loader15SharedLibLoader5_ctorMFAaAaAaZC8derelict4util6loader15SharedLibLoader"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader16findMaxAvailableMFZE8derelict6opengl2gl9GLVersion":
(.text+0x4e0a): undefined reference to "_D8derelict4util6compat9toDStringFPaZAa"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader16findMaxAvailableMFZE8derelict6opengl2gl9GLVersion":
(.text+0x4e25): undefined reference to "_D8derelict4util6compat7findStrFAaAaZi"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader16findMaxAvailableMFZE8derelict6opengl2gl9GLVersion":
(.text+0x4e49): undefined reference to "_D8derelict4util6compat7findStrFAaAaZi"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader16findMaxAvailableMFZE8derelict6opengl2gl9GLVersion":
(.text+0x4e6d): undefined reference to "_D8derelict4util6compat7findStrFAaAaZi"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader16findMaxAvailableMFZE8derelict6opengl2gl9GLVersion":
(.text+0x4e91): undefined reference to "_D8derelict4util6compat7findStrFAaAaZi"
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader16findMaxAvailableMFZE8derelict6opengl2gl9GLVersion":
(.text+0x4eb5): undefined reference to "_D8derelict4util6compat7findStrFAaAaZi"
/usr/lib64/libDerelictGL.a(gl.o):(.text+0x4ed9): more undefined references to "_D8derelict4util6compat7findStrFAaAaZi" follow
/usr/lib64/libDerelictGL.a(gl.o): In function "_D8derelict6opengl2gl16DerelictGLLoader16bindExtendedFuncMFPPvAabZv":
(.text+0x4d8b): undefined reference to "_D8derelict4util9exception28Derelict_HandleMissingSymbolFAaAaZv"
/usr/lib64/libDerelictGL.a(gl.o):(.data+0x50): undefined reference to "_D8derelict4util6loader15SharedLibLoader7__ClassZ"
/usr/lib64/libDerelictGL.a(gl.o):(.rodata+0xc0): undefined reference to "_D8derelict4util6loader15SharedLibLoader4loadMFZv"
/usr/lib64/libDerelictGL.a(gl.o):(.rodata+0xc8): undefined reference to "_D8derelict4util6loader15SharedLibLoader4loadMFAaZv"
/usr/lib64/libDerelictGL.a(gl.o):(.rodata+0xd0): undefined reference to "_D8derelict4util6loader15SharedLibLoader4loadMFAAaZv"
/usr/lib64/libDerelictGL.a(gl.o):(.rodata+0xd8): undefined reference to "_D8derelict4util6loader15SharedLibLoader6unloadMFZv"
/usr/lib64/libDerelictGL.a(gl.o):(.rodata+0xe0): undefined reference to "_D8derelict4util6loader15SharedLibLoader8isLoadedMFZb"
/usr/lib64/libDerelictGL.a(gl.o):(.rodata+0xf0): undefined reference to "_D8derelict4util6loader15SharedLibLoader10loadSymbolMFAaZPv"
/usr/lib64/libDerelictGL.a(gl.o):(.rodata+0xf8): undefined reference to "_D8derelict4util6loader15SharedLibLoader3libMFZC8derelict4util9sharedlib9SharedLib"
/usr/lib64/libDerelictGL.a(gl.o):(.rodata+0x100): undefined reference to "_D8derelict4util6loader15SharedLibLoader8bindFuncMFPPvAabZv"
/usr/lib64/libDerelictGL.a(glx.o): In function "_D8derelict6opengl3glx12loadGLSymbolFAaZPv":
(.text+0x512): undefined reference to "_D8derelict4util6compat9toCStringFAaZPa"
/usr/lib64/libDerelictGL.a(extloader.o): In function "_D8derelict6opengl9extloader14extIsSupportedFAaZb":
(.text+0x2e4): undefined reference to "_D8derelict4util6compat9toDStringFPaZAa"
/usr/lib64/libDerelictGL.a(extloader.o): In function "_D8derelict6opengl9extloader14extIsSupportedFAaZb":
(.text+0x303): undefined reference to "_D8derelict4util6compat7findStrFAaAaZi"
collect2: ld a retourné 1 code d"état d"exécution
Error: linking failed:
status: 1
|
|
|
Back to top |
|
|
michaelp
Joined: 27 Jul 2008 Posts: 114
|
Posted: Tue Sep 14, 2010 6:12 am Post subject: |
|
|
Sorry, forgot to mention that you need to link in DerelictUtil as well. ( -L -lDerelictUtil )
This is needed for all programs that use Derelict. |
|
Back to top |
|
|
bioinfornatics
Joined: 22 Jun 2010 Posts: 90
|
Posted: Tue Sep 14, 2010 10:57 am Post subject: |
|
|
yes is better
big big big big thanks |
|
Back to top |
|
|
|