From 65e0728ca8fe0d2dd872691cc5d29d8211ae2956 Mon Sep 17 00:00:00 2001 From: mlr3000 Date: Wed, 31 Aug 2016 09:38:32 +0800 Subject: [PATCH] CentOS error /tmp/go-build252214657/github.com/djimenez/iconv-go/_obj/converter.cgo2.o: In function `call_iconv': converter.cgo2.c:(.text+0x16): undefined reference to `libiconv' /tmp/go-build252214657/github.com/djimenez/iconv-go/_obj/converter.cgo2.o: In function `_cgo_5f3e10abf205_C2func_iconv_close': converter.cgo2.c:(.text+0xa7): undefined reference to `libiconv_close' /tmp/go-build252214657/github.com/djimenez/iconv-go/_obj/converter.cgo2.o: In function `_cgo_5f3e10abf205_C2func_iconv_open': converter.cgo2.c:(.text+0xfb): undefined reference to `libiconv_open' /tmp/go-build252214657/github.com/djimenez/iconv-go/_obj/converter.cgo2.o: In function `_cgo_5f3e10abf205_Cfunc_iconv_close': converter.cgo2.c:(.text+0x183): undefined reference to `libiconv_close' /tmp/go-build252214657/github.com/djimenez/iconv-go/_obj/converter.cgo2.o: In function `_cgo_5f3e10abf205_Cfunc_iconv_open': converter.cgo2.c:(.text+0x1b7): undefined reference to `libiconv_open' collect2: error: ld returned 1 exit status --- converter.go | 1 + 1 file changed, 1 insertion(+) diff --git a/converter.go b/converter.go index 0b404e6..c0a9f49 100644 --- a/converter.go +++ b/converter.go @@ -4,6 +4,7 @@ package iconv #cgo darwin LDFLAGS: -liconv #cgo freebsd LDFLAGS: -liconv #cgo windows LDFLAGS: -liconv +#cgo LDFLAGS: -liconv #include #include