Program exited with code -11

Rikki Cattermole via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Nov 26 00:14:56 PST 2015


On 26/11/15 9:12 PM, Alex wrote:
> Hello guys.
>
> I am beginner with D and a hobbyist in general when it comes to
> programming. I am following an SFML tutorial in C++ and trying to
> "translate it" to D (at least the parts I think I understand). I am
> using Derelict SFML2 bindgings to CSFML.
>
> First I tried to do it procedural way and it works fine:
>
> http://pastebin.com/6PjRCUHp
>
> Then I tried an OOP way as per tutorial:
>
> app.d =
>
> module app;
> import notquiteciv.game;
>
> void main()
> {
>      Game game = new Game();
>
>      game.gameLoop();
> }
>
> game.d = http://pastebin.com/ps9mMxGf
>
> When I run "dub run" or "dub run --force", I get this:
>
> Running ./notquiteciv
> Program exited with code -11
>
> $ lldb ./notquiteciv (run)
>
> Process 81278 launched: './notquiteciv' (x86_64)
> Process 81278 stopped
> * thread #1: tid = 0x14dae3, 0x0000000000000000, queue =
> 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
>      frame #0: 0x0000000000000000
> error: memory read failed for 0x0
>
> I am stuck. Can you give me a hint regarding this?
>
> Thank you.


You forgot to load the pointers to the functions in the shared library :)

https://github.com/DerelictOrg/DerelictSFML2


More information about the Digitalmars-d-learn mailing list