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
Closed

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

gopherbot opened this issue Mar 13, 2013 · 10 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@gopherbot
Copy link

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

rsc commented Jul 30, 2013

Comment 3:

Labels changed: added go1.2maybe.

@rsc
Copy link
Contributor

rsc commented Jul 30, 2013

Comment 4:

Labels changed: added feature.

@robpike
Copy link
Contributor

robpike commented Aug 30, 2013

Comment 5:

Not for 1.2.

Labels changed: removed go1.2maybe.

@rsc
Copy link
Contributor

rsc commented Nov 27, 2013

Comment 6:

Labels changed: added go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Nov 27, 2013

Comment 7:

Labels changed: removed feature.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 8:

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

@rsc
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
Copy link
Contributor

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?

@bcmills bcmills added WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Jan 18, 2019
@ianlancetaylor
Copy link
Contributor

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

@golang golang locked and limited conversation to collaborators Jan 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

5 participants