loadlibrary failed with error -1073741795 in SDL2

2019-08-19 00:15发布

Help me with this "loadlibrary failed with error -1073741795"

I'm using Code::Blocks & SDL2.

I asked my friend to downgrade my laptop from win10 to win7. Now i can't run my C++ programs. Every time I run my program, this error: "loadlibrary failed with error -1073741795" always happens.

But I figured out where the problem is. It's in SDL_Renderer*. Whenever Im initializing my renderer pointer then I run the program, It always ends up in error.

Like this:

SDL_Window *window = NULL; //just for demo purpose, I'll include this declaration of window pointer.

SDL_Renderer *renderer = NULL;

window = SDL_CreateWindow(blah blah blah)

//and this is the initialization where the error happens
renderer = SDL_CreateRenderer(window, -1,
                              SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);

But when I comment out the initialization of renderer pointer;

//    renderer = SDL_CreateRenderer(window, -1,
//                                  SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);

it runs just fine.

EDITED: I also figured out the same error. Its in video player like VLC. I can't play any video clips in VLC media player. But my clips run ok in Windows Media Player. The same error happens. I think the problem is in the driver I guess. But I don't know how to fix this.

0条回答
登录 后发表回答