1
D / Re: Trouble Linking DSFML...
« on: February 05, 2015, 11:38:00 pm »
: D that does work, thankyou!! Putting the files from the nightly into /usr/lib also works when building from the command line. DMD and GDC via Code::Blocks still can't find any of the libraries ending in -2... I messed around with both the global and project specific build options but I'm again not really sure what I'm doing and haven't stumbled across a fix for it in my IDE's settings.
Even with libs in /usr/lib GDC gives me the error below and does not output a file.
In any case, I now have a way to get it working, so thankyou again!
Even with libs in /usr/lib GDC gives me the error below and does not output a file.
Code: [Select]
gdc main.d -I/SFML/DSFML-source/src -L-L/SFML/DSFML-source/lib -L-L/SFML/DSFML-nightly -L-ldsfml-graphics-2 -L-ldsfml-window-2 -L-ldsfml-system-2 -L-ldsfml-graphics -L-ldsfml-window -L-ldsfml-system -L-ljpeg -L-lGL -L-lGLU -L-lfreetype -L-lGLEW -L-lX11 -L-lXrandr
/tmp/ccLzt87z.o: In function `_Dmain':
main.d:(.text+0x9f): undefined reference to `_D5dsfml6window9videomode9VideoMode6__ctorMFNckkkZS5dsfml6window9videomode9VideoMode'
main.d:(.text+0xca): undefined reference to `_D5dsfml8graphics12renderwindow12RenderWindow7__ClassZ'
main.d:(.text+0xf6): undefined reference to `_D5dsfml6window15contextsettings15ContextSettings7DefaultxS5dsfml6window15contextsettings15ContextSettings'
main.d:(.text+0x109): undefined reference to `_D5dsfml8graphics12renderwindow12RenderWindow6__ctorMFS5dsfml6window9videomode9VideoModeAyaE5dsfml6window6window6Window5StyleKxS5dsfml6window15contextsettings15ContextSettingsZC5dsfml8graphics12renderwindow12RenderWindow'
main.d:(.text+0x112): undefined reference to `_D5dsfml8graphics11circleshape11CircleShape7__ClassZ'
main.d:(.text+0x12c): undefined reference to `_D5dsfml8graphics11circleshape11CircleShape6__ctorMFfkZC5dsfml8graphics11circleshape11CircleShape'
main.d:(.text+0x14a): undefined reference to `_D5dsfml8graphics5color5Color5GreenyS5dsfml8graphics5color5Color'
main.d:(.text+0x156): undefined reference to `_D5dsfml6system7vector214__T7Vector2TfZ7Vector26__initZ'
main.d:(.text+0x186): undefined reference to `_D5dsfml6system7vector214__T7Vector2TfZ7Vector26__ctorMFNaNbNcNfffZS5dsfml6system7vector214__T7Vector2TfZ7Vector2'
main.d:(.text+0x1c5): undefined reference to `_D5dsfml8graphics11circleshape11CircleShape7__ClassZ'
main.d:(.text+0x1df): undefined reference to `_D5dsfml8graphics11circleshape11CircleShape6__ctorMFfkZC5dsfml8graphics11circleshape11CircleShape'
main.d:(.text+0x1fd): undefined reference to `_D5dsfml8graphics5color5Color4BlueyS5dsfml8graphics5color5Color'
main.d:(.text+0x209): undefined reference to `_D5dsfml6system7vector214__T7Vector2TfZ7Vector26__initZ'
main.d:(.text+0x239): undefined reference to `_D5dsfml6system7vector214__T7Vector2TfZ7Vector26__ctorMFNaNbNcNfffZS5dsfml6system7vector214__T7Vector2TfZ7Vector2'
main.d:(.text+0x278): undefined reference to `_D5dsfml8graphics11circleshape11CircleShape7__ClassZ'
main.d:(.text+0x292): undefined reference to `_D5dsfml8graphics11circleshape11CircleShape6__ctorMFfkZC5dsfml8graphics11circleshape11CircleShape'
main.d:(.text+0x2b0): undefined reference to `_D5dsfml8graphics5color5Color4BlueyS5dsfml8graphics5color5Color'
main.d:(.text+0x2bc): undefined reference to `_D5dsfml6system7vector214__T7Vector2TfZ7Vector26__initZ'
main.d:(.text+0x2ec): undefined reference to `_D5dsfml6system7vector214__T7Vector2TfZ7Vector26__ctorMFNaNbNcNfffZS5dsfml6system7vector214__T7Vector2TfZ7Vector2'
main.d:(.text+0x32b): undefined reference to `_D5dsfml8graphics11circleshape11CircleShape7__ClassZ'
main.d:(.text+0x345): undefined reference to `_D5dsfml8graphics11circleshape11CircleShape6__ctorMFfkZC5dsfml8graphics11circleshape11CircleShape'
main.d:(.text+0x363): undefined reference to `_D5dsfml8graphics5color5Color3RedyS5dsfml8graphics5color5Color'
main.d:(.text+0x36f): undefined reference to `_D5dsfml6system7vector214__T7Vector2TfZ7Vector26__initZ'
main.d:(.text+0x39f): undefined reference to `_D5dsfml6system7vector214__T7Vector2TfZ7Vector26__ctorMFNaNbNcNfffZS5dsfml6system7vector214__T7Vector2TfZ7Vector2'
main.d:(.text+0x3e0): undefined reference to `_D5dsfml6system7vector214__T7Vector2TfZ7Vector26__initZ'
main.d:(.text+0x410): undefined reference to `_D5dsfml6system7vector214__T7Vector2TfZ7Vector26__ctorMFNaNbNcNfffZS5dsfml6system7vector214__T7Vector2TfZ7Vector2'
main.d:(.text+0x41f): undefined reference to `_D5dsfml8graphics14rectangleshape14RectangleShape7__ClassZ'
main.d:(.text+0x43b): undefined reference to `_D5dsfml8graphics14rectangleshape14RectangleShape6__ctorMFS5dsfml6system7vector214__T7Vector2TfZ7Vector2ZC5dsfml8graphics14rectangleshape14RectangleShape'
main.d:(.text+0x459): undefined reference to `_D5dsfml8graphics5color5Color5GreenyS5dsfml8graphics5color5Color'
main.d:(.text+0x465): undefined reference to `_D5dsfml6system7vector214__T7Vector2TfZ7Vector26__initZ'
main.d:(.text+0x495): undefined reference to `_D5dsfml6system7vector214__T7Vector2TfZ7Vector26__ctorMFNaNbNcNfffZS5dsfml6system7vector214__T7Vector2TfZ7Vector2'
main.d:(.text+0x502): undefined reference to `_D5dsfml6window5event5Event6__initZ'
main.d:(.text+0x510): undefined reference to `_D5dsfml6window5event5Event6__initZ'
main.d:(.text+0x58a): undefined reference to `_D5dsfml8graphics5color5Color5BlackyS5dsfml8graphics5color5Color'
main.d:(.text+0x59e): undefined reference to `_D5dsfml8graphics12renderstates12RenderStates7DefaultFNdZS5dsfml8graphics12renderstates12RenderStates'
main.d:(.text+0x634): undefined reference to `_D5dsfml8graphics12renderstates12RenderStates7DefaultFNdZS5dsfml8graphics12renderstates12RenderStates'
main.d:(.text+0x6ca): undefined reference to `_D5dsfml8graphics12renderstates12RenderStates7DefaultFNdZS5dsfml8graphics12renderstates12RenderStates'
main.d:(.text+0x760): undefined reference to `_D5dsfml8graphics12renderstates12RenderStates7DefaultFNdZS5dsfml8graphics12renderstates12RenderStates'
main.d:(.text+0x7f6): undefined reference to `_D5dsfml8graphics12renderstates12RenderStates7DefaultFNdZS5dsfml8graphics12renderstates12RenderStates'
/tmp/ccLzt87z.o:(.data+0x10): undefined reference to `_D5dsfml8graphics12__ModuleInfoZ'
/tmp/ccLzt87z.o:(.data._D87TypeInfo_S3std8typecons50__T10RebindableTyC5dsfml8graphics7texture7TextureZ10Rebindable6__initZ[_D87TypeInfo_S3std8typecons50__T10RebindableTyC5dsfml8graphics7texture7TextureZ10Rebindable6__initZ]+0x38): undefined reference to `_D3std8typecons50__T10RebindableTyC5dsfml8graphics7texture7TextureZ10Rebindable11__xopEqualsFKxS3std8typecons50__T10RebindableTyC5dsfml8graphics7texture7TextureZ10RebindableKxS3std8typecons50__T10RebindableTyC5dsfml8graphics7texture7TextureZ10RebindableZb'
/tmp/ccLzt87z.o:(.data._D85TypeInfo_S3std8typecons48__T10RebindableTyC5dsfml8graphics6shader6ShaderZ10Rebindable6__initZ[_D85TypeInfo_S3std8typecons48__T10RebindableTyC5dsfml8graphics6shader6ShaderZ10Rebindable6__initZ]+0x38): undefined reference to `_D3std8typecons48__T10RebindableTyC5dsfml8graphics6shader6ShaderZ10Rebindable11__xopEqualsFKxS3std8typecons48__T10RebindableTyC5dsfml8graphics6shader6ShaderZ10RebindableKxS3std8typecons48__T10RebindableTyC5dsfml8graphics6shader6ShaderZ10RebindableZb'
/tmp/ccLzt87z.o:(.data._D81TypeInfo_S3std8typecons44__T10RebindableTyC5dsfml8graphics4font4FontZ10Rebindable6__initZ[_D81TypeInfo_S3std8typecons44__T10RebindableTyC5dsfml8graphics4font4FontZ10Rebindable6__initZ]+0x38): undefined reference to `_D3std8typecons44__T10RebindableTyC5dsfml8graphics4font4FontZ10Rebindable11__xopEqualsFKxS3std8typecons44__T10RebindableTyC5dsfml8graphics4font4FontZ10RebindableKxS3std8typecons44__T10RebindableTyC5dsfml8graphics4font4FontZ10RebindableZb'
collect2: error: ld returned 1 exit status
In any case, I now have a way to get it working, so thankyou again!