Recent

Author Topic: SDL - Using correct SDL.dll  (Read 1826 times)

Milsa

  • Sr. Member
  • ****
  • Posts: 328
SDL - Using correct SDL.dll
« on: September 01, 2018, 09:54:14 am »
I have application in Lazarus for 32 or 64 bit Windows. When I start this application it searches SDL.dll. But SDL.dll is 2 versions (32 and 64 bits) and its aren't compatible with other Windows.

How can I ensure that 32-bit Windows uses SDL32.dll and 64-bit Windows uses SDL64.dll.

Files SDL32.dll and SDL64.dll are my files after rename from SDL.dll for xx-bit paltform.
I work with Lazarus 4.0, FPC 3.2.2, date 2025-05-03
This information is actual to: 3rd Aug 2025

ASerge

  • Hero Member
  • *****
  • Posts: 2475
Re: SDL - Using correct SDL.dll
« Reply #1 on: September 01, 2018, 10:16:40 am »
How can I ensure that 32-bit Windows uses SDL32.dll and 64-bit Windows uses SDL64.dll.
Windows uses the library that you specify. Therefore, for 64 and 32 bit versions of your program, use different names
Code: Pascal  [Select][+][-]
  1. const
  2.   SDL_dll = {$IFDEF WIN64}'SDL64.dll'{$ELSE}'SDL32.dll'{$ENDIF};
  3.  
  4. procedure SomeProcFromDll(...); external SDL_dll;

 

TinyPortal © 2005-2018