-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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/cgo: does not support c++ (use swig) #1476
Labels
Comments
Cgo does not support C++. If you'd like to add support for this kind of basic stuff, that would be great. But it's not super high on our priority list. The suggested way to wrap C++ is to use SWIG. Owner changed to r...@golang.org. Status changed to HelpWanted. |
I've figured it out. The trick is to have a extern "C" header file without code and then include the C++ code via CGO_OFILES. Example attached. Attachments:
|
If anyone plays with this in future, keep issue #1500 in mind. |
Some discussion on stackoverflow: http://stackoverflow.com/questions/1713214/how-to-use-c-in-go/1721230 |
Adding SWIG support to the go tool: http://golang.org/cl/5845071/ |
This issue was closed by revision 8448536. Status changed to Fixed. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Attachments:
The text was updated successfully, but these errors were encountered: