FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Build fail

 
Post new topic   Reply to topic     Forum Index -> Derelict
View previous topic :: View next topic  
Author Message
bioinfornatics



Joined: 22 Jun 2010
Posts: 90

PostPosted: Mon Sep 13, 2010 4:34 pm    Post subject: Build fail Reply with quote

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
View user's profile Send private message
bioinfornatics



Joined: 22 Jun 2010
Posts: 90

PostPosted: Mon Sep 13, 2010 4:47 pm    Post subject: Reply with quote

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
View user's profile Send private message
michaelp



Joined: 27 Jul 2008
Posts: 114

PostPosted: Mon Sep 13, 2010 5:06 pm    Post subject: Reply with quote

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
View user's profile Send private message
bioinfornatics



Joined: 22 Jun 2010
Posts: 90

PostPosted: Tue Sep 14, 2010 4:41 am    Post subject: Reply with quote

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
View user's profile Send private message
michaelp



Joined: 27 Jul 2008
Posts: 114

PostPosted: Tue Sep 14, 2010 6:12 am    Post subject: Reply with quote

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
View user's profile Send private message
bioinfornatics



Joined: 22 Jun 2010
Posts: 90

PostPosted: Tue Sep 14, 2010 10:57 am    Post subject: Reply with quote

yes is better Very Happy

big big big big thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Derelict All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group