Ok, so for a game I'm working on, my programmer has decided to use FreePascal with SDL, and has shown me that it works (though he is using a Linux OS and I'm not). I have tried multiple methods of linking the SDL2.dll and the accompanying header files to the Lazarus project, but none of them seem to be working. Here's what I've tried so far:
- Adding the .dlls to the project folder of the project I'm working with
- Adding the .dlls to the FPC "Units" folder in my OS
- Adding the .dlls path in the project options window
- Adding the .dlls folder directly in the fpc.cfg file:
searchpath for libraries
-FlC:\lazarus\fpc\$FPCVERSION/lib
-Fl/lib;/usr/lib
-FlC:\lazarus\fpc\$FPCVERSION/lib/$FPCTARGET
-FlC:\lazarus\fpc\$FPCVERSION/lib/$FPCTARGET/SDL2
searchpath for tools
-FDC:\lazarus\fpc\$FPCVERSION/bin/$FPCTARGET
So I do also have them in the Uses location:
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Classes, sysutils, SDL2, SDL2_ttf
Basically, how do I link the SDL2 library to Lazarus on a Windows 8 OS?