Skip to content
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

Closed
gopherbot opened this Issue Mar 13, 2013 · 10 comments

Comments

Projects
None yet
5 participants
@gopherbot
Copy link

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.

Copy link
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.

Copy link
Contributor

rsc commented Jul 30, 2013

Comment 3:

Labels changed: added go1.2maybe.

@rsc

This comment has been minimized.

Copy link
Contributor

rsc commented Jul 30, 2013

Comment 4:

Labels changed: added feature.

@robpike

This comment has been minimized.

Copy link
Contributor

robpike commented Aug 30, 2013

Comment 5:

Not for 1.2.

Labels changed: removed go1.2maybe.

@rsc

This comment has been minimized.

Copy link
Contributor

rsc commented Nov 27, 2013

Comment 6:

Labels changed: added go1.3maybe.

@rsc

This comment has been minimized.

Copy link
Contributor

rsc commented Nov 27, 2013

Comment 7:

Labels changed: removed feature.

@rsc

This comment has been minimized.

Copy link
Contributor

rsc commented Dec 4, 2013

Comment 8:

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

@rsc

This comment has been minimized.

Copy link
Contributor

rsc commented Dec 4, 2013

Comment 9:

Labels changed: added repo-main.

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

@bcmills

This comment has been minimized.

Copy link
Member

bcmills commented Jan 18, 2019

This issue is very old. Is it still reproducible using a modern Go toolchain?

If so, what are the concrete go commands we need to issue to reproduce it?

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

ianlancetaylor commented Jan 19, 2019

I'm pretty sure this works now. The SWIG support is completely different these days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.