Project checks, Hints: 1Note: passing compiler option -M twice with different valuesHint: (11030) Start of reading config file /Users/yd/Lazarus/v1.8.2n/fpc/bin/aarch64-darwin/fpc.cfgHint: (11031) End of reading config file /Users/yd/Lazarus/v1.8.2n/fpc/bin/aarch64-darwin/fpc.cfgFree Pascal Compiler version 3.3.1-r49155 [2021/04/09] for aarch64Copyright (c) 1993-2021 by Florian Klaempfl and others(1002) Target OS: Darwin for AArch64(3104) Compiling teststream.pp/Volumes/Projects/Tests/Lazarus/libcurl/teststream.pp(43,5) Note: (5027) Local variable "hCurl" is assigned but never used(9001) Assembling (pipe) /Volumes/Projects/Tests/Lazarus/libcurl/lib/aarch64-darwin/teststream.s(9015) Linking /Volumes/Projects/Tests/Lazarus/libcurl/teststreamUndefined symbols for architecture arm64: "_curl_easy_init", referenced from: _PASCALMAIN in teststream.old: symbol(s) not found for architecture arm64Error: (9013) Error while linkingFatal: (10026) There were 1 errors compiling module, stoppingFatal: (1018) Compilation abortedError: /Users/yd/Lazarus/v1.8.2n/fpc/bin/aarch64-darwin/ppca64 returned an error exitcode
┌<─ /opt/homebrew/Cellar/curl/7.76.1/lib ────────────────────────────────────────────.[^]>┐│.n Name │ Size │Modify time ││/.. │UP--DIR│May 6 04:59││/pkgconfig │ 96│May 6 04:59││ libcurl.4.dylib │ 596528│May 6 04:59││ libcurl.a │ 955824│Apr 14 08:58││@libcurl.dylib │ 15│Apr 14 08:58│
Have you added that directory to the linker's library search path? (-Fl/opt/homebrew/Cellar/curl/7.76.1/lib)
Looking at the source of that unit, it's missing a {$linklib curl} directive. I wonder why it was enabled for Darwin, since it was obviously never tested there.(You can add that line to your program, it doesn't have to be in the unit itself)
Looks like the compiler is selecting the static rather than the dynamic library to link against, not sure why (in that case you have to manually specify all of the dependent libraries to link against as well). Did you use {$linklib libcurl.a} perhaps? Try {$linklib libcurl.dylib} instead.
Looking at the source of that unit, it's missing a {$linklib curl} directive. I wonder why it was enabled for Darwin, since it was obviously never tested there.