View previous topic :: View next topic |
Author |
Message |
wobbles-grogan
Joined: 24 Sep 2012 Posts: 4
|
Posted: Fri Nov 23, 2012 4:43 pm Post subject: Getting strange "object.Error: Access violation" |
|
|
Hi,
Im getting a strange error when I run a simple Derelict SDL program.
Code is:
Code: |
module test;
import std.stdio;
import Derelict.sdl.sdl;
pragma(lib, "DerelictSDL.lib");
pragma(lib, "DerelictUtil.lib");
const char* WINDOW_TITLE = "SDL Starter..";
const char* WINDOW_MODE = "0";
int main(char[][] args){
DerelictSDL.load();
SDL_Init(SDL_INIT_VIDEO);
SDL_Quit();
return 0;
}
|
and the error is:
Code: |
PS C:\DProjects\firstProj> .\bin\test.exe
object.Error: Access Violation
----------------
0x0040D4FC
0x0040D387
0x772AB679 in LdrRemoveLoadAsDataTable
0x772AB64B in LdrRemoveLoadAsDataTable
0x7726010F in KiUserExceptionDispatcher
0x004039C2
0x004035E4
0x00417301
0x74A43677 in BaseThreadInitThunk
0x77289F42 in RtlInitializeExceptionChain
0x77289F15 in RtlInitializeExceptionChain
|
Anyone see this before?
I've been googling around but theres very little solutions...
Cheers |
|
Back to top |
|
|
wobbles-grogan
Joined: 24 Sep 2012 Posts: 4
|
Posted: Mon Nov 26, 2012 10:57 am Post subject: |
|
|
Ok, i believe I've found my issue.
Just in case anyone else comes across the same thing:
It looks like the program was looking up the wrong SDL.dll file, so, I directed it to the correct one using the following code segment...
Code: |
version(Windows){
DerelictSDL.load("Path_To_The_Correct_SDL.dll_FIle");
} |
Thats put in place of the DerelictSDL.load() piece in the original posting... |
|
Back to top |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
|
Back to top |
|
|
|