You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
I don't have an ad hoc example but I stumbled upon the issue while go getting a githhub
repo so the code is there.
1.
$ go get github.com/jteeuwen/glfw
What is the expected output?
$
What do you see instead?
# github.com/jteeuwen/glfw
ld: duplicate symbol _setCharCB in $WORK/github.com/jteeuwen/glfw/_obj/glfw.cgo2.o and
$WORK/github.com/jteeuwen/glfw/_obj/_cgo_export.o for architecture x86_64
collect2: ld returned 1 exit status
Which compiler are you using (5g, 6g, 8g, gccgo)?
6g
Which operating system are you using?
$ uname -rs
Darwin 11.3.0
Which revision are you using? (hg identify)
$ hg identify
96bd78e7d35e weekly/weekly.2012-02-22
$ go version
go version weekly.2012-02-22 +96bd78e7d35e
Please provide any additional information below.
more details here:
https://groups.google.com/d/msg/golang-nuts/_HKIFbWX0Co/dwASE-SGPXIJ
The text was updated successfully, but these errors were encountered:
What is setCharCB (or _setCharCB?) I don't see it defined in glue.h,
but the bug must becaused by including glue.h in _cgo_export.h now
(this is new behavior).
'setCharCB' is defined in line 25 of
https://github.com/jteeuwen/glfw/blob/master/callback.go as:
// void setCharCB() { glfwSetCharCallback(goCharCB); }
and only called from line 195 in the same file as:
C.setCharCB()
Where the linker gets the underscored version from is unknown to me.
Thanks for tracking that down. That kind of definition
is no longer supported in cgo packages that use //export.
You should talk to the owner of that code to get it updated.
The change is documented in "The cgo command" section
here: http://weekly.golang.org/doc/go1.html#cmd_cgo
Russ
by giacomo.tartari:
The text was updated successfully, but these errors were encountered: