0 Members and 3 Guests are viewing this topic.
module main;import dsfml.graphics.all;import dsfml.window.all;import dsfml.system.all;void main(string[] args){ RenderWindow app = new RenderWindow(VideoMode(800, 600, 32), "SFML D-Test"); while(app.isOpened()) { app.clear(Color(255, 255, 255)); }}
object.Error: Access ViolationAn exception was thrown while finalizing an instance of class dsfml.graphics.renderwindow.RenderWindow
The only point where this does not work is the Access Vioaltion error, as it does not call the stacktrace callback function for some reason.
I modified druntime to support stack-tracing for all kind of exceptions. It's very simple: 1) In object_.d, change traceContext() function linkage to C: extern(C) Throwable.TraceInfo traceContext(void* ptr = null) { ... } 2) In rt\deh.c, declare Interface* traceContext(void* ptr); and add the following line to _d_create_exception_object (rt\deh.c) exc->info = traceContext(NULL);
2>RenderWindow.obj : error LNK2019: unresolved external symbol "public: void __thiscall sf::Window::Create(struct HWND__ *,struct sf::ContextSettings const &)" (?Create@Window@sf@@QAEXPAUHWND__@@ABUContextSettings@2@@Z) referenced in function _sfRenderWindow_CreateFromHandle
2>RenderWindow.obj : error LNK2019: unresolved external symbol "public: struct HWND__ * __thiscall sf::Window::GetSystemHandle(void)const " (?GetSystemHandle@Window@sf@@QBEPAUHWND__@@XZ) referenced in function _sfRenderWindow_GetSystemHandle
csfml-audio-d-2.dllcsfml-graphics-d-2.dllcsfml-system-d-2.dllcsfml-window-d-2.dll