Sign in to follow this  
MrJoshL

SDL Error 0xc000007b

Recommended Posts

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?

Share this post


Link to post
Share on other sites

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.

Edited by Servant of the Lord

Share this post


Link to post
Share on other sites

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 

Edited by MrJoshL

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this