Discussion:
[Swig-user] Issue with example (Examples/go/callback)
Luis C
2017-06-20 10:31:20 UTC
Permalink
Hi All,

Im trying to understand one of the examples, to be more precise the example
swig/Examples/go/callback, and when I'm compile the code (make) the output
is exactly the same:

env ./runme
Adding and calling a normal C++ callback
----------------------------------------
Callback::run()
Callback::~Callback()

Adding and calling a Go callback
--------------------------------
Callback::run()
Callback::~Callback()

Go exit

and there is a callback on the file (gocallback.go) that is not called. I
was expecting the output "GoCallback.Run" on the example. I'm missing
something? is the go method Run, not called?

Im using swig 3.0 and go 1.6

Regards,
Luis
William S Fulton
2017-07-01 11:06:15 UTC
Permalink
Post by Luis C
Hi All,
Im trying to understand one of the examples, to be more precise the example
swig/Examples/go/callback, and when I'm compile the code (make) the output
env ./runme
Adding and calling a normal C++ callback
----------------------------------------
Callback::run()
Callback::~Callback()
Adding and calling a Go callback
--------------------------------
Callback::run()
Callback::~Callback()
Go exit
and there is a callback on the file (gocallback.go) that is not called. I
was expecting the output "GoCallback.Run" on the example. I'm missing
something? is the go method Run, not called?
Im using swig 3.0 and go 1.6
This was fixed just recently, see https://github.com/swig/swig/issues/600
and https://github.com/swig/swig/issues/955.

William

Loading...