Jump to content

  • Log In with Google      Sign In   
  • Create Account

SDL Error 0xc000007b


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 Toothpix   Crossbones+   -  Reputation: 810

Like
0Likes
Like

Posted 29 December 2012 - 11:16 AM

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.


Sponsor:

#2 Servant of the Lord   Crossbones+   -  Reputation: 19665

Like
1Likes
Like

Posted 29 December 2012 - 12:01 PM

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, 29 December 2012 - 12:09 PM.

It's perfectly fine to abbreviate my username to 'Servant' rather than copy+pasting it all the time.
All glory be to the Man at the right hand... On David's throne the King will reign, and the Government will rest upon His shoulders. All the earth will see the salvation of God.
Of Stranger Flames - [indie turn-based rpg set in a para-historical French colony] | Indie RPG development journal

[Fly with me on Twitter] [Google+] [My broken website]

[Need web hosting? I personally like A Small Orange]


#3 Toothpix   Crossbones+   -  Reputation: 810

Like
1Likes
Like

Posted 29 December 2012 - 01:58 PM

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, 29 December 2012 - 02:11 PM.

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


#4 Servant of the Lord   Crossbones+   -  Reputation: 19665

Like
1Likes
Like

Posted 29 December 2012 - 02:02 PM

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?


It's perfectly fine to abbreviate my username to 'Servant' rather than copy+pasting it all the time.
All glory be to the Man at the right hand... On David's throne the King will reign, and the Government will rest upon His shoulders. All the earth will see the salvation of God.
Of Stranger Flames - [indie turn-based rpg set in a para-historical French colony] | Indie RPG development journal

[Fly with me on Twitter] [Google+] [My broken website]

[Need web hosting? I personally like A Small Orange]


#5 Toothpix   Crossbones+   -  Reputation: 810

Like
0Likes
Like

Posted 30 December 2012 - 09:40 AM

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.


#6 Servant of the Lord   Crossbones+   -  Reputation: 19665

Like
1Likes
Like

Posted 30 December 2012 - 11:21 AM

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


It's perfectly fine to abbreviate my username to 'Servant' rather than copy+pasting it all the time.
All glory be to the Man at the right hand... On David's throne the King will reign, and the Government will rest upon His shoulders. All the earth will see the salvation of God.
Of Stranger Flames - [indie turn-based rpg set in a para-historical French colony] | Indie RPG development journal

[Fly with me on Twitter] [Google+] [My broken website]

[Need web hosting? I personally like A Small Orange]





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS