Author Topic: error (0xc000007b) during the set up of sdl  (Read 9325 times)

Offline jackyPITCH

  • Single posting newcomer
  • *
  • Posts: 3
error (0xc000007b) during the set up of sdl
« on: April 27, 2018, 04:09:00 pm »
Hello i'm new to c::b and i try to learn sdl, and to set up the sdl 2 on c::b i followed this tuto http://lazyfoo.net/tutorials/SDL/01_hello_SDL/windows/codeblocks/index.php#5, and everything went well until the last f9 where i got this error (0xc000007b),the application will not start. here is the code : https://pastebin.com/Ug93dxdM thank you

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: error (0xc000007b) during the set up of sdl
« Reply #1 on: April 27, 2018, 05:16:24 pm »
If you get this error from codeblocks then you have to describe better what happens

If you get this error from your application then this is the wrong forum to ask this kind of questions... We do not give support for compiler/third party libraries ecc...

in general try a rebuild (build->clean and build->build)
Post build logs, check your dlls, check your compiler...

Online stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: error (0xc000007b) during the set up of sdl
« Reply #2 on: April 27, 2018, 09:13:58 pm »
Link found by Google for this error: https://www.techcrises.com/how-to/how-to-fix-error-code-0xc000007b-in-windows-7-8-8-1/

If C::B is not having the error; then, I would try the things in the link.
Note: I would likely do "Method 7: Check and fix dll dependencies with Dependency Walker" first; then, try the other things suggested.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline jackyPITCH

  • Single posting newcomer
  • *
  • Posts: 3
Re: error (0xc000007b) during the set up of sdl
« Reply #3 on: April 28, 2018, 10:41:27 am »
thank you guys, i tried rebuild, it did not works, i tried lots of method but it didn't work. maybe what i should have said earlier is that the error is happening after i put the SDL2.dll in the folder c:\windows/syswow64/.., and before i put it i got the error " can not find sdl2.dll. Plus when i run a program without including sdl it works.


edit : i just did method 7 and have a lot ( like 50 ) error "error opening file" should i dl all the missing dll ?  thank you again
« Last Edit: April 28, 2018, 10:48:37 am by jackyPITCH »

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: error (0xc000007b) during the set up of sdl
« Reply #4 on: April 28, 2018, 04:03:15 pm »
Quote
i put the SDL2.dll in the folder c:\windows/syswow64/
ok, this is the worst idea i have heard in a lot years.... NEVER EVER copy ANYTHING into your windows directory... You will only hit TONS and TONS of strange problems (like you do now)...

if your application can not find the dll then put it in the same directory as your application. If it sitll can not found there is something wrong with the compilation. but NEVER copy it to the windows folder. Not long ago i had an application that installed the QT and libstdc++6 dlls into the system folder... boy had i a lot problems with the system after this...

Your error is probably because you are using the wrong dll in the wrong place... Like having 10 sdl libraries in your system folder...

Quote
edit : i just did method 7 and have a lot ( like 50 ) error "error opening file" should i dl all the missing dll ?  thank you again
probably not.... If dependency walker can not find them it does not mean they are missing... They are simply not there where depwalker is searching them.

Does a CLEAN sdl project works?
If not, what are the errors? If yes, what did you do that it did not work?
Anyway, i don't think this is the right forum to answer this questions...

Offline jackyPITCH

  • Single posting newcomer
  • *
  • Posts: 3
Re: error (0xc000007b) during the set up of sdl
« Reply #5 on: April 28, 2018, 04:14:01 pm »
Quote
ok, this is the worst idea i have heard in a lot years.... NEVER EVER copy ANYTHING into your windows directory... You will only hit TONS and TONS of strange problems (like you do now)...

i just followed the tuto on http://lazyfoo.net/tutorials/SDL/01_hello_SDL/windows/codeblocks/index.php . and when i take the sdl2.dll off the syswow64 folder, i just have the error "cannot find sdl2.dll" . the code i use to test if the sdl is working is the "hello_sdl.zip" that lazyfoo provide ( you can download it at the end of the link i gave earlier, or i gave you a pastebin in my original post )

what do you mean by "clean" ? as soon as there is the line #include <SDL.h>, i got the error, even if i just want Hello World. thank you for your answer btw

EDIT : ok so i put the sdl2.dll in the c::b folder, it do not provides the same error, but now i have tons of undefined reference (like SDL_Error , SDL_Delay ) but i have the #include <SDL.h> ? any ideas ?


NEW EDIT : ok i just did nothing and now the error changed : ld.exe||cannot find -lSDLmain| ld.exe||cannot find -lSDL| ||error: ld returned 1 exit status| i dont know what to do

new edit 2 :  ok the error are not the same when in the linker settings i put -lSDL2main -lSDL2 -lmingw32 and -lSDLmain -lSDL -lmingw32, without the 2 this is the error from the new edit and with the 2 its the error from the edit

« Last Edit: April 28, 2018, 04:58:20 pm by jackyPITCH »

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: error (0xc000007b) during the set up of sdl
« Reply #6 on: April 28, 2018, 05:23:43 pm »
Quote
i just followed the tuto on http://lazyfoo.net/tutorials/SDL/01_hello_SDL/windows/codeblocks/index.php .
then this is terrible tutorial.


Quote
and when i take the sdl2.dll off the syswow64 folder, i just have the error "cannot find sdl2.dll"
You have to put the dll somewhere your program can find it. in the same folder as your exe, not as codeblocks...

follow this tutorial: https://www.youtube.com/watch?v=Gj3iXwvKmUY i only zapped trough it but it seems ok

btw. you get this cryptik 0x..... error message because the dll from this tutorial is build with a older mingw version as you are using and for this the dlls are not compatible with your exe