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
Go: SWIG doesn't work with MSVC #1886
Comments
The problem is this code in
The linked file there seems to show that cgo also assumes I'm not familiar enough with Go to give reliable advice here, but I wonder if MSVC just isn't supported by Go. If you know how to specify the equivalent of |
I believe you are right, cgo doesn't support MSVC yet golang/go#20982. |
Until Go supports MSVC, also see golang/go#49080, SWIG is not going to support MSVC compilation + Go. |
I see an issue back from 2013 which might be related #100
Sample code
Now
swig.exe -c++ -go -intgosize 32 example.i
generatesexample_wrap.cxx
Now in a cmd.exe
vcvars32.bat
thencl.exe example.cc example_wrap.cxx
gives the following errorsAlso, I read on stackoverflow that only 32 bit compiling is supported on windows https://stackoverflow.com/a/17429595/8608146 is this still true in 2020 (I'm not able to verify it because of the above errors which also occur when using 64 bit i.e.
vcvars64.bit
and-gointsize 64
)The text was updated successfully, but these errors were encountered: