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

SWIG syntax error - change order of keywords. #94

Closed
0x0f0f0f opened this issue Nov 9, 2020 · 3 comments
Closed

SWIG syntax error - change order of keywords. #94

0x0f0f0f opened this issue Nov 9, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@0x0f0f0f
Copy link
Contributor

0x0f0f0f commented Nov 9, 2020

I am generating bindings for Go using SWIG. A bit challenging for me tbh.
I do not know if it is a convention or not, but SWIG failed throwing a syntax error when parsing lines from the single header containing:

static unsigned const

I figured out that just changing the order to this, fixed the problem.

static const unsigned

Yes, this is funny, but it made SWIG accept the Kompute.hpp header. lol.
I'm not familiar with quom at all. I'll try opening a PR

@axsaucedo
Copy link
Member

Oh wow, that seems like a pretty nasty bug, thanks for the heads up, I think having SWIG interoperability would be important - currently the Python bindings are built using Cython and Pybind11, but SWIG is always a common tool for these. I would be interested to learn more about your implementation, if you publish it I'd be keen to try it and link it as I do quite a lot of work in Go as well.

@axsaucedo axsaucedo added the enhancement New feature or request label Nov 9, 2020
@0x0f0f0f
Copy link
Contributor Author

0x0f0f0f commented Nov 9, 2020

github.com/0x0f0f0f/kompute-go

Just tried this morning to make SWIG generate the wrapper. Works, assumes kompute is installed in /usr/local/lib . Only thing is that the types and methods are kinda messed up. I would really like to implement kompute for go. HMU by mail!

@axsaucedo
Copy link
Member

Thank you again @0x0f0f0f ! I will close this issue for now, but I would be very keen to explore the kompute-go piece, seems quite interesting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants