From 0e69e4e9c65fcbb5c4394e9b2f3be675e0d849cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=ADas=20Insaurralde?= Date: Mon, 14 Jul 2025 17:48:24 -0300 Subject: [PATCH] Add build tag and appropriate LDFLAGS for macOS support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Matías Insaurralde --- openfhe.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openfhe.go b/openfhe.go index bdd4af3..aa80805 100644 --- a/openfhe.go +++ b/openfhe.go @@ -5,7 +5,8 @@ package openfhe /* #cgo CFLAGS: -I/usr/local/include -I/usr/local/include/openfhe/core -I/usr/local/include/openfhe/pke -I/usr/local/include/openfhe/ -I/usr/local/include/openfhe/binfhe #cgo CXXFLAGS: -I/usr/local/include -I/usr/local/include/openfhe/core -I/usr/local/include/openfhe/pke -I/usr/local/include/openfhe/ -I/usr/local/include/openfhe/binfhe -std=c++17 -#cgo LDFLAGS: -lOPENFHEcore -lOPENFHEpke -lstdc++ -lm -lpthread +#cgo darwin LDFLAGS: -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lOPENFHEcore -lOPENFHEpke -lstdc++ -lm -lpthread +#cgo linux LDFLAGS: -lOPENFHEcore -lOPENFHEpke -lstdc++ -lm -lpthread #include "openfhe_c.h" // header only – no .cpp here */ import "C"