SDL Error 0xc000007b

Started by
4 comments, last by Servant of the Lord 11 years, 3 months ago

I realize this is a very ambiguous question, and I apologize that I cannot be more specific.

I started using SDL the other day, and wrote a program to load a .bmp image file and display it on the screen. I initialized everything in SDL first. I included the linked library and I put the image in the program directory. For some reason, whenever I run the program (which is compiled by MinGW), it displays error 0xc000007b. I am not an expert in Windows error messages, so I am asking here. Is this something I did?

C dominates the world of linear procedural computing, which won't advance. The future lies in MASSIVE parallelism.

Advertisement

Comment out the image loading code, recompile, and see if the code runs. I don't think it's the loading itself, but the DLL being incompatible for some reason.

I just found this PDF of error codes online, which has your error listed in it (for future error lookups), but doesn't give too great of a description:

0xC000007B - STATUS_INVALID_IMAGE_FORMAT
{Bad Image} %hs is either not designed to run on Windows or it contains an error. Try installing the program again
using the original installation media or contact your system administrator or the software vendor for support.

(Ignore the "invalid image" part, it's not talking about a picture/image, it's talking about a binary object like an exe or a DLL - I think)

Are you using a 64 bit or a 32 bit computer? Which version of the SDL library did you download - the 32 bit, or the 64 bit one?

You are using MinGW, but maybe you are linking against a DLL that was compiled for Visual Studio.

Thank you so much for the help. I am using MinGW on 64-bit Windows. I believe I downloaded the 64-bit MinGW version. I still do have a problem, however. I found that I had the VC++ .dll of an older SDL version in System32 from a different application that I had awhile ago, and the new gcc dll was not in my programs directory. I fixed all that, and am now back to productivity. Thanks

C dominates the world of linear procedural computing, which won't advance. The future lies in MASSIVE parallelism.

Did you find out what the problem was? Good for you! smile.png
Could you post the solution for future users who google when they encounter a similar problem?

What happened was I had already SDL.dll in System32, and it was an older version of SDL for Visual Studio. I fixed it by deleting that one, getting the new SDL.dll from the development libraries for MinGW, putting the new .dll in the program's directory, and putting libgcc_s_dw2-1.dll in the program directory. After that, it worked fine.

C dominates the world of linear procedural computing, which won't advance. The future lies in MASSIVE parallelism.

Heheh, that's happened to me in the past.

I never stick anything in the System32 directory anymore - it causes more problems than it solves. smile.png

This topic is closed to new replies.

Advertisement