New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: compile .c files with swig too #5041

Open
gopherbot opened this Issue Mar 13, 2013 · 8 comments

Comments

Projects
None yet
3 participants
@gopherbot

gopherbot commented Mar 13, 2013

by meyerkp:

I tried out the swig tutorial example using the swig and go (tip)
versions below:

SWIG Version 2.0.9 , 
$ go version
go version devel +dfbaf2b999a6 Tue Mar 12 21:37:18 2013 -0700 linux/amd64

The following files (attached) are in $GOPATH/src/example:
example.c, example.swig, declar.go

(declare.go was added to prevent go install complaining about the lack of go files in
the directory.

test.go is in $GOPATH/src/.

As per http://groups.google.com/group/golang-nuts/browse_thread/thread/3ff41b4e38f47f92

The following error occurs:

 go build test.go
~/go/src$ ./test
./test: symbol lookup error:
/home/kmeyer/go/pkg/linux_amd64/swig/example-example-swig.so: undefined symbol:
My_variable

Attachments:

  1. example.c (248 bytes)
  2. example.swig (314 bytes)
  3. test.go (132 bytes)
  4. declar.go (16 bytes)
@robpike

This comment has been minimized.

Contributor

robpike commented Jul 1, 2013

Comment 1:

Labels changed: added priority-later, removed priority-triage.

Owner changed to @ianlancetaylor.

Status changed to Accepted.

@rsc

This comment has been minimized.

Contributor

rsc commented Jul 30, 2013

Comment 3:

Labels changed: added go1.2maybe.

@rsc

This comment has been minimized.

Contributor

rsc commented Jul 30, 2013

Comment 4:

Labels changed: added feature.

@robpike

This comment has been minimized.

Contributor

robpike commented Aug 30, 2013

Comment 5:

Not for 1.2.

Labels changed: removed go1.2maybe.

@rsc

This comment has been minimized.

Contributor

rsc commented Nov 27, 2013

Comment 6:

Labels changed: added go1.3maybe.

@rsc

This comment has been minimized.

Contributor

rsc commented Nov 27, 2013

Comment 7:

Labels changed: removed feature.

@rsc

This comment has been minimized.

Contributor

rsc commented Dec 4, 2013

Comment 8:

Labels changed: added release-none, removed go1.3maybe.

@rsc

This comment has been minimized.

Contributor

rsc commented Dec 4, 2013

Comment 9:

Labels changed: added repo-main.

@rsc rsc added this to the Unplanned milestone Apr 10, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment