Derelict on Ubuntu with CODE::BLOCKS

RegeleIONESCU regeleionescu at gmail.com
Thu May 3 18:36:04 UTC 2018


On Thursday, 3 May 2018 at 06:33:53 UTC, Mike Parker wrote:
> On Thursday, 3 May 2018 at 03:18:02 UTC, RegeleIONESCU wrote:
>
>
>>
>> The only problem I have with DUB is that all added 
>> dependencies are "old". For example added dependency 
>> "derelict-sdl2" is version="~>2.1.4" while on DUB site the 
>> last version is 3.1.0-alpha.3. I tried the --upgrade plus 
>> --prerelease option but the dependencies remain the same. I 
>> tried to write myself the version in the dub.sdl but I get 
>> errors related to other packages. Is there anyway to make DUB 
>> automatically use the latest version of a dependency?
>>
>
> You an control that with precision, specifying specific 
> versions if you want. But with Derelict, if you're using 
> mulitple Derelict package you have to make sure that all of 
> them depend on the same major version of DerelictUtil.
>
> If you paste your full dependency list here, exactly as it's 
> written in your package configuration, I might be able to help 
> you.

Hello!

I tried to execute the example from Derelict-SDL2 but I get some 
troubles. Here is the program:

import std.stdio;
import derelict.sdl2.sdl;
import derelict.sdl2.image;
import derelict.sdl2.mixer;
import derelict.sdl2.ttf;
import derelict.sdl2.net;
void main()
{
	DerelictSDL2.load();
	DerelictSDL2Image.load();
	DerelictSDL2Mixer.load();
	DerelictSDL2ttf.load();
	DerelictSDL2Net.load();
	writeln("What is wrong????????????????");
}


Here is the dub.sdl file content:
name "project_01"
description "SDL2_image test app"
authors "Christian"
copyright "Copyright © 2018, Christian"
license "proprietary"
dependency "derelict-sdl2" version="~>2.1.4"


Here is the dub.selections.json
{
	"fileVersion": 1,
	"versions": {
		"derelict-sdl2": "2.1.4",
		"derelict-util": "2.0.6"
	}
}



And here is the error I get when I execute dub run:

christian at Christians:~/D_Projects$ dub run
Performing "debug" build using /usr/bin/dmd for x86_64.
derelict-util 2.0.6: target for configuration "library" is up to 
date.
derelict-sdl2 2.1.4: target for configuration "library" is up to 
date.
project_01 ~master: building configuration "application"...
Linking...
To force a rebuild of up-to-date targets, run again with --force.
Running ./project_01
derelict.util.exception.SymbolLoadException at ../../.dub/packages/derelict-util-2.0.6/derelict-util/source/derelict/util/exception.d(35): Failed to load symbol SDL_DequeueAudio from shared library libSDL2-2.0.so.0
----------------
../../.dub/packages/derelict-util-2.0.6/derelict-util/source/derelict/util/sharedlib.d:177 void* derelict.util.sharedlib.SharedLib.loadSymbol(immutable(char)[], bool) [0x450eef]
../../.dub/packages/derelict-util-2.0.6/derelict-util/source/derelict/util/loader.d:323 void* derelict.util.loader.SharedLibLoader.loadSymbol(immutable(char)[], bool) [0x44f42a]
../../.dub/packages/derelict-util-2.0.6/derelict-util/source/derelict/util/loader.d:346 void derelict.util.loader.SharedLibLoader.bindFunc(void**, immutable(char)[], bool) [0x44f480]
../../.dub/packages/derelict-sdl2-2.1.4/derelict-sdl2/source/derelict/sdl2/sdl.d:111 void derelict.sdl2.sdl.DerelictSDL2Loader.loadSymbols() [0x44ab1f]
../../.dub/packages/derelict-util-2.0.6/derelict-util/source/derelict/util/loader.d:198 void derelict.util.loader.SharedLibLoader.load(immutable(char)[][]) [0x44f2aa]
../../.dub/packages/derelict-util-2.0.6/derelict-util/source/derelict/util/loader.d:143 void derelict.util.loader.SharedLibLoader.load(immutable(char)[]) [0x44f224]
../../.dub/packages/derelict-util-2.0.6/derelict-util/source/derelict/util/loader.d:82 void derelict.util.loader.SharedLibLoader.load() [0x44f107]
source/app.d:10 _Dmain [0x44899a]
Program exited with code 1
christian at Christians:~/D_Projects$

Could you help me, please?

Thank you very much for your kind support!

p.s. I am using Ubuntu 16.04.


More information about the Digitalmars-d-learn mailing list