Thread overview | |||||
---|---|---|---|---|---|
|
November 26, 2015 Program exited with code -11 | ||||
---|---|---|---|---|
| ||||
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. |
November 26, 2015 Re: Program exited with code -11 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Alex | 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 |
November 26, 2015 Re: Program exited with code -11 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Rikki Cattermole | On Thursday, 26 November 2015 at 08:15:02 UTC, Rikki Cattermole wrote:
> You forgot to load the pointers to the functions in the shared library :)
>
> https://github.com/DerelictOrg/DerelictSFML2
OMG. I am embarrassed. Thank you very much.
|
Copyright © 1999-2021 by the D Language Foundation