From 12c262621efda35ffb833afa33d31b739ba58d77 Mon Sep 17 00:00:00 2001 From: xushiwei Date: Sat, 15 Jun 2024 10:02:54 +0800 Subject: [PATCH] c/sqlite: use pkg-config --- c/cjson/cjson.go | 2 +- c/math/math.go | 4 ++++ c/sqlite/sqlite.go | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/c/cjson/cjson.go b/c/cjson/cjson.go index ea1872b4..03a8e5ec 100644 --- a/c/cjson/cjson.go +++ b/c/cjson/cjson.go @@ -23,7 +23,7 @@ import ( ) const ( - LLGoPackage = "link: $(pkg-config --libs libcjson)" + LLGoPackage = "link: $(pkg-config --libs libcjson); -lcjson" ) // llgo:type C diff --git a/c/math/math.go b/c/math/math.go index dabf419b..ee6c4932 100644 --- a/c/math/math.go +++ b/c/math/math.go @@ -22,6 +22,10 @@ import ( "github.com/goplus/llgo/c" ) +const ( + LLGoPackage = "decl" +) + //go:linkname Acos C.acos func Acos(x float64) float64 diff --git a/c/sqlite/sqlite.go b/c/sqlite/sqlite.go index 1390d665..af60f323 100644 --- a/c/sqlite/sqlite.go +++ b/c/sqlite/sqlite.go @@ -23,7 +23,7 @@ import ( ) const ( - LLGoPackage = "link: sqlite3" + LLGoPackage = "link: $(pkg-config --libs sqlite3); -lsqlite3" ) // llgo:type C