/Applications/Amazon Photos.app/Contents/MonoBundle/libsqlite3.dylib
/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/tvOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libsqlite3.dylib
/Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/watchOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libsqlite3.dylib
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libsqlite3.dylib
So my question is how do I direct my TSQLDBLibraryLoader object to use the right library on OSX Big Sur?
So I guess the question here is whether\if Lazarus IDE and FPC linker will ever be able to utilise this system for us. Meanwhile, I will try to work out how to compile libsqlite3.dylib myself and include it with my application. Or whatever. The pains of developing for OSX.
There used to be (Mojave and Catalina) /usr/lib/libsqlite3.dylib but no more.
trev@macmini8 [/Users/trev] $ sw_vers
ProductName: macOS
ProductVersion: 11.2.3
BuildVersion: 20D91
trev@macmini8 [/Users/trev] $ dyld_shared_cache_util -list | grep sqlite
/usr/lib/libsqlite3.dylib
trev@macmini8 [/Users/trev/Documents/fpc_libsqlite3] $ ./program
library loads successfully
unloading library
Where are you getting dyld_shared_cache_util, Trev? I don't have it on my Big Sur?You have to compile it from source: https://wiki.freepascal.org/macOS_Big_Sur_changes_for_developers#Built-in_dynamic_linker_cache
There is no trace of libsqlite3.dylib on my Big Sur right now, that I have been able to find.As I have mentioned two times before, and as is mentioned even in text you quoted yourself in this thread [1], that is completely normal (for that library, and also for every other library from /usr included in macOS 11), and it has nothing to do with the problem you have.
I quickly tried switching to LoadLibrary instead of dlopen as you've shown with same problem.