Recent

Author Topic: Problem with compiling SDL2 program on macOS Ventura with Apple Silicon  (Read 2081 times)

cybermonkey342

  • New Member
  • *
  • Posts: 42
    • Home of EGSL interpreter
Hello everyone,

unfortunately, I'm stuck here. I'm trying to compile a program that uses SDL2 on a Mac with macOS Ventura and Apple Silicon. I don't want to link against the library, but against the framework. I provide the following parameters, which worked under macOS Monterey:

Quote
fpc spritemove.pas -Ff/Library/Frameworks

However, under Ventura, I only get the following error messages:

Quote
Linking spritemove
ld: library not found for -lSDL2
An error occurred while linking
spritemove.pas(72,32) Error: Error while linking
spritemove.pas(72,32) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/local/bin/ppca64 returned an error exitcode

What am I doing wrong? By the way, it works perfectly fine with clang when I compile a C programm using SDL2 like this:

Quote
clang SDLTest.c -o SDLTest -I/Library/Frameworks/SDL2.framework/Headers -F/Library/Frameworks -framework SDL2
« Last Edit: April 07, 2023, 11:20:22 am by cybermonkey342 »
--
Best regards

cybermonkey342

carl_caulkett

  • Sr. Member
  • ****
  • Posts: 306
Re: Problem with compiling SDL2 program on macOS Ventura with Apple Silicon
« Reply #1 on: October 09, 2023, 11:24:40 am »
I can go one better. I'm getting similar build failures after a fresh install of Lazarus 2.2.6 on macOS 13.6 Ventura. This time with a completely blank project 😮
"It builds... ship it!"

Mac Mini M1
macOS 13.6 Ventura
Lazarus 2.2.6 (release version)
FPC 3.2.2 (release version)

 

TinyPortal © 2005-2018