Golang bindings after upgrading to Xcode 15

After upgrading to Xcode 15, my golang program would fail running with the following error:

dyld[26496]: Symbol not found: _fdb_create_database

From what I can work out, Xcode 15 came with a new linker (ld-prime) which no longer looks in /usr/local/lib for the dynamic library.

The way I’ve gotten around this is to include the following flag as part of the go build step:

 -ldflags='-r "/usr/local/lib"'

Is this now a necessary flag in building go programs using the foundation db libraries?

Thanks for reporting this issue. We’ve noticed the same and probably the solution for this is to add the dynamic path in the main file header, similar to: (go - How to use a dynamically linked library from relative path - Stack Overflow).