I'm trying to embed the harfbuzz(http://github.com/harfbuzz/harfbuzz) 
library source code into go package, 
just like what the glfw(http://github.com/go-gl/glfw) library does.
The difference is that glfw contains only C, but harfbuzz is actually a C++ 
library and provide C API.

My cgo header code is here:

/*
#cgo CFLAGS: -Iharfbuzz/src -std=c++11 -x c++
#cgo LDFLAGS: -lstdc++

#include <stdlib.h>
#include "hb.h"
#include "hb-ot.h"
#include "harfbuzz.cc"
*/
import "C"


when i compile it, i got many errors like 
./harfbuzz.go:50:42: could not determine kind of name for C.char
./harfbuzz.go:373:20: could not determine kind of name for C.float
./harfbuzz.go:327:2: could not determine kind of name for C.free
./harfbuzz.go:97:9: could not determine kind of name for C.hb_blob_create
./harfbuzz.go:316:2: could not determine kind of name for C.hb_blob_destroy
./harfbuzz.go:325:11: could not determine kind of name for 
C.hb_blob_get_data
./harfbuzz.go:320:14: could not determine kind of name for 
C.hb_blob_get_length
./harfbuzz.go:87:84: could not determine kind of name for C.hb_blob_t

but there is no errors when i change the cgo header to use the dynamic 
library installed by Homebrew.

 I am not so familiar with Cgo/C++ compiling, could anyone help me.
Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/284d5720-8daa-4dd8-9733-80973d650e9b%40googlegroups.com.

Reply via email to