Recent

Author Topic: [SOLVED] [SDL2 UNIT] How i can fix 0x000007b error?  (Read 4809 times)

DiCri

  • Full Member
  • ***
  • Posts: 151
  • My goal : Build a game
    • http://manueldicriscito.altervista.org/DinoLand.zip
[SOLVED] [SDL2 UNIT] How i can fix 0x000007b error?
« on: July 19, 2016, 03:53:46 pm »
i installed SDL2 Unit because i saw it is very suitable for games.. i tried to run a sample code as this:
Code: Pascal  [Select][+][-]
  1. uses sdl2;
  2. begin
  3. //initalization of video subsystem
  4. if SDL_Init(SDL_INIT_VIDEO) < 0 then HALT;
  5. readln;
  6. //shutting down video subsystem
  7. SDL_Quit;
  8. end.
  9.  
When i run this (correctly compiled) pascal file, it tells me error 0x000007b so it is impossible to run the program. I saw on a website that it means there are some missing file .dll... i downloaded, copied and pasted them on System32 folder but the error always displays. Can you tell me what i must do for fix this problem? sorry bad english.. :)
« Last Edit: July 19, 2016, 04:50:46 pm by Manu12x »
I'm a game developer.. Now studying..
Go download my game:
http://manueldicriscito.altervista.org/DinoLand.zip

molly

  • Hero Member
  • *****
  • Posts: 2330
Re: [SDL2 UNIT] How i can fix 0x000007b error?
« Reply #1 on: July 19, 2016, 04:02:40 pm »
I had a hunch you were going to attempt this  ;)

What i did is that i placed the dll's inside the directory which also contains the executable that you just compiled (that should at least quick fix your issue).

I do not recognize the error, but we could check some things:
- which version of windows are you running (and is it 32 or 64 bit) ?
- do you have antivirus software running ?
- which SDL file did you download exactly (full filename please).

Depending on the answer(s) you either downloaded and installed the wrong version of the sdl2 archive (32 vs 64 bit) or you compiled your source for the wrong target.

There is also a slight change that your antivirus software is preventing your code or dll to load properly. Did you had similar looking problems in the past ?

DiCri

  • Full Member
  • ***
  • Posts: 151
  • My goal : Build a game
    • http://manueldicriscito.altervista.org/DinoLand.zip
Re: [SDL2 UNIT] How i can fix 0x000007b error?
« Reply #2 on: July 19, 2016, 04:18:41 pm »
I had a hunch you were going to attempt this  ;)

What i did is that i placed the dll's inside the directory which also contains the executable that you just compiled (that should at least quick fix your issue).

I do not recognize the error, but we could check some things:
- which version of windows are you running (and is it 32 or 64 bit) ?
- do you have antivirus software running ?
- which SDL file did you download exactly (full filename please).

Depending on the answer(s) you either downloaded and installed the wrong version of the sdl2 archive (32 vs 64 bit) or you compiled your source for the wrong target.

There is also a slight change that your antivirus software is preventing your code or dll to load properly. Did you had similar looking problems in the past ?
this problem went much times when i downloaded applications from internet but i fix them downloading dll files like msvcp100.dll or other similar.
Yes i have antivirus but i don't like them because i see it spams. more than one. i should unistall some of them.
i have windows 8.1 64 bit and i downloaded the zip of "Pascal-SDL-2-Headers-masters" and "SDL2-2.0.4-win32-x64"
help thanks
I'm a game developer.. Now studying..
Go download my game:
http://manueldicriscito.altervista.org/DinoLand.zip

molly

  • Hero Member
  • *****
  • Posts: 2330
Re: [SDL2 UNIT] How i can fix 0x000007b error?
« Reply #3 on: July 19, 2016, 04:24:15 pm »
Quote
Yes i have antivirus but i don't like them because i see it spams. more than one. i should unistall some of them.
i have windows 8.1 64 bit and i downloaded the zip of "Pascal-SDL-2-Headers-masters" and "SDL2-2.0.4-win32-x64"
help thanks
Ok, then the next question would be what do you use to compile your source-code with ?

Do you use FreePascal (only) or do you use Lazarus to compile your source with ? And which version of freepascal and/or lazarus do you have installed ? And is it a 32-bit version or a 64-bit version (or perhaps even both)

The only logical explanation that comes to mind would be if you compiled your source for a 32-bit target.
« Last Edit: July 19, 2016, 04:25:51 pm by molly »

DiCri

  • Full Member
  • ***
  • Posts: 151
  • My goal : Build a game
    • http://manueldicriscito.altervista.org/DinoLand.zip
Re: [SDL2 UNIT] How i can fix 0x000007b error?
« Reply #4 on: July 19, 2016, 04:28:42 pm »
Quote
Yes i have antivirus but i don't like them because i see it spams. more than one. i should unistall some of them.
i have windows 8.1 64 bit and i downloaded the zip of "Pascal-SDL-2-Headers-masters" and "SDL2-2.0.4-win32-x64"
help thanks
Ok, then the next question would be what do you use to compile your source-code with ?

Do you use FreePascal (only) or do you use Lazarus to compile your source with ? And which version of freepascal and/or lazarus do you have installed ? And is it a 32-bit version or a 64-bit version (or perhaps even both)

The only logical explanation that comes to mind would be if you compiled your source for a 32-bit target.
I don't like Lazarus so i use Free Pascal because for me it is more simple. I have Free Pascal 3.0.0 but i don't know if it is 32 bit or 64 bit.. In the bin folder there is another folder called i386-win32.. It means that it is 32 bit?
I'm a game developer.. Now studying..
Go download my game:
http://manueldicriscito.altervista.org/DinoLand.zip

molly

  • Hero Member
  • *****
  • Posts: 2330
Re: [SDL2 UNIT] How i can fix 0x000007b error?
« Reply #5 on: July 19, 2016, 04:34:16 pm »
I don't like Lazarus so i use Free Pascal because for me it is more simple. I have Free Pascal 3.0.0 but i don't know if it is 32 bit or 64 bit.. In the bin folder there is another folder called i386-win32.. It means that it is 32 bit?
No problem, i also use Free Pascal in combination with my favourite text-editor  :)

Yes, that indeed means you have a 32-bit version of Freepascal and as such it will generate 32-bit executables by default.

The quickest way to solve this problem is by downloading the 32-bit version of the SDL2.dll and placing that inside the same directory as your executable. Also make sure to remove all other SDL2.dll versions that are located inside your windows directory.

Please do it thoroughly, as there are a whole bunch of other libraries that you need to download and 'install' in case you are following that tutorial till the end. Also for those download the 32-bit versions.

The try again to see if that worked ok for you.
« Last Edit: July 19, 2016, 04:37:25 pm by molly »

DiCri

  • Full Member
  • ***
  • Posts: 151
  • My goal : Build a game
    • http://manueldicriscito.altervista.org/DinoLand.zip
Re: [SOLVED] [SDL2 UNIT] How i can fix 0x000007b error?
« Reply #6 on: July 19, 2016, 04:51:38 pm »
Thanks it works! i didn't think that x86 was 32 bit :D
Thanks so much ("hero member") ;D
I'm a game developer.. Now studying..
Go download my game:
http://manueldicriscito.altervista.org/DinoLand.zip

 

TinyPortal © 2005-2018