On Wed, Apr 24, 2019 at 4:16 PM Nitish Saboo wrote:
> >>Why size_t, char is going to be undefined here ? I followed the exact steps
> >>mentioned in 'https://github.com/golang/go/wiki/cgo#function-variables'
> >>under the topic 'Function pointer callback'.
> I have to pass the callback
On Wed, Apr 24, 2019 at 1:51 PM Nitish Saboo
wrote:
>
> Hi,
>
> I followed the link '
https://github.com/golang/go/wiki/cgo#function-variables' and made the
following changes:
> 1)main.go
> package main
> //#cgo CFLAGS: -I./syslog-ng-3.6.2/
> //#cgo LDFLAGS: syslog-node.so
> //#cgo LDFLAGS:
On Wed, Apr 24, 2019 at 1:51 PM Nitish Saboo wrote:
>
> Hi,
>
> I followed the link
> 'https://github.com/golang/go/wiki/cgo#function-variables' and made the
> following changes:
> 1)main.go
> package main
> //#cgo CFLAGS: -I./syslog-ng-3.6.2/
> //#cgo LDFLAGS: syslog-node.so
> //#cgo LDFLAGS:
Hi,
I followed the link '
https://github.com/golang/go/wiki/cgo#function-variables' and made the
following changes:
*1)main.go*
package main
//#cgo CFLAGS: -I./syslog-ng-3.6.2/
//#cgo LDFLAGS: syslog-node.so
//#cgo LDFLAGS: -L/usr/local/lib/ -lsyslog-ng
//#cgo LDFLAGS: -L/usr/local/lib/syslog-ng
On Wed, Apr 24, 2019 at 10:47 AM Nitish Saboo wrote:
> ./main.go:80:32: cannot use key (type *_Ctype_char) as type string in map
> index
func CallBack(ckey *C.char, value *C.char, value_len C.size_t){
key := C.GoString(ckey)
if remap, ok := field_mappings[key]; ok {
Hi,
I am facing the following issue:
I have a GO code that has to be called from the C code:
var field_mappings map[string]string = map[string]string{
" A": "a",
"B": "b",
"C": "c",
"D": "d"}
//export CallBack
func CallBack(key *C.char, value *C.char, value_len C.size_t){