Lazarus

Programming => General => Topic started by: MDtox on May 31, 2019, 05:25:30 pm

Title: Error 0x000007b while running the program using SDL2
Post by: MDtox on May 31, 2019, 05:25:30 pm
I wanted to run simple program to get window. It compiled succesfully, but I get an error while running this program. Help please.
Title: Re: Error 0x000007b while running the program using SDL2
Post by: skalogryz on May 31, 2019, 05:52:01 pm
did you mean 0xc000007b?

It sounds like you're compiling 64-bit app and trying to load 32-bit SDL2 dll.
OR
vice-versa

If you're compiling 64-bit app, you need to use 64-bit SDL2 dll
If you're compiling 32-bit app, you need to use 32-bit SDL2 dll
If you're not sure what version you're compiling, just download 32 or 64 bit version of Lazarus (depending on what SDL2 dlls you're using) and reinstall.
Title: Re: Error 0x000007b while running the program using SDL2
Post by: MDtox on May 31, 2019, 08:57:57 pm
Skalogryz I'm using free pascal compiler, not Lazarus. I have win10 64-bit and downloaded SDL2 64 bit too. Then I copied SDL.dll to C:\Windows\Win32, it didn't work, but when I copied this dll to C:\Windows\SynWOW64 folder(I did not deleted this dll from Win32 folder, perhaps I should?), it did. I also downloaded(.zip) pascal sdl headers https://github.com/ev1313/Pascal-SDL-2-Headers and extracted these to Desktop, added path to it via FPC using C:\Users\User\Desktop\FolderName. I can't solve this problem.
Title: Re: Error 0x000007b while running the program using SDL2
Post by: skalogryz on May 31, 2019, 09:11:40 pm
I'm using free pascal compiler, not Lazarus.
and what FPC is installed? and what command is used to compile the program?
fpc
ppci386
ppcx64
?

as a reminder. 32-bit applications and dlls will work on Win64 just fine.