Thread: I use the example in this page ,but got error

I use the example in this page ,but got error

From
PG Doc comments form
Date:
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/16/xfunc-c.html
Description:

quhan@khan1-3 build % clang -shared -fPIC -o libpqtxt.dylib ../src/*.c
-I/Library/PostgreSQL/17/include/postgresql/server
-I/Library/PostgreSQL/17/include -L/Library/PostgreSQL/17/lib -lpq
-lpgcommon -lpgport -lintl -lzstd -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto
-lgssapi_krb5 -lz -lreadline -lm
ld: Undefined symbols:
  _pg_detoast_datum_packed, referenced from:
      _concat_text in qdf2txt-pgsql-7fefa5.o
      _concat_text in qdf2txt-pgsql-7fefa5.o
clang: error: linker command failed with exit code 1 (use -v to see
invocation)