Hi!
I tried creating C binding library of Storj RC 1.0 uplink-c on my Windows system as follows:
cd go/src/storj.io/uplink-c
go build -o libuplinkc.a -buildmode=c-archive
This step generates libuplinkc.h
, libuplinkc.a
and uplink_definitions.h
.
When I copy these 3 in the folder where my C++ code exists, then the C++ code compiles successfully
However, when I copy these 3 files (libuplinkc.h
, libuplinkc.a
and uplink_definitions.h
) on the same C++ code folder on MacOS, then on compilation of C++ code, I get this error:
In file included from ..........cpp:9:
cgo-gcc-export-header-prolog:106:8: error: unknown type name '_Bool'
extern _Bool bucket_iterator_next(BucketIterator* p0);
^
cgo-gcc-export-header-prolog:186:8: error: unknown type name '_Bool'
extern _Bool object_iterator_next(ObjectIterator* p0);
^
The temporary fix (i.e. changing _Bool
to bool
in both these declarations) works, but is not a proper fix as I need to regenerate the libuplinkc.h library with some custom functions
Kindly suggest a proper fix.
Thanks