Re: [go-nuts] Re: Wrestling with Mingw64 on Windows

2017-02-01 Thread Arie van Wingerden
@tim I tried that. So, I have installed the tdm-gcc-64 compiler, which should be capable of compiling 32 and 64 bit binaries. QUESTION: Does anybody have a short example of a project needing cgo to check if my installation is correct? (must compile to either 32 or 64 bit binary) Because at the mo

[go-nuts] Re: Wrestling with Mingw64 on Windows

2017-01-30 Thread Tim O'Brien
I've been using CGO on Windows for a while it works well. I followed Andrew Gerrand's advice here: https://groups.google.com/forum/#!topic/golang-dev/Rjgft0z8ICo I installed TDM-GCC, and then Go. See the discussion there. Tim On Tuesday, 31 January 2017 02:32:34 UTC+11, Arie van Wingerden wrot

Re: [go-nuts] Re: Wrestling with Mingw64 on Windows

2017-01-30 Thread Arie van Wingerden
Maybe! Tomorrow i'll investigate this further. Thx! On Jan 30, 2017 6:39 PM, "Roberto Zanotto" wrote: > Maybe gcc.exe is the 64 version, since you installed mingw64. Have you > tried it with cgo? > > On Monday, January 30, 2017 at 6:31:40 PM UTC+1, Roberto Zanotto wrote: >> >> That's strange. I'

Re: [go-nuts] Re: Wrestling with Mingw64 on Windows

2017-01-30 Thread Roberto Zanotto
Maybe gcc.exe is the 64 version, since you installed mingw64. Have you tried it with cgo? On Monday, January 30, 2017 at 6:31:40 PM UTC+1, Roberto Zanotto wrote: > > That's strange. I'm 100% positive that i686-w64-mingw32 is 32bit > and x86_64-w64-mingw32 is 64bit. > The help message that you ar

Re: [go-nuts] Re: Wrestling with Mingw64 on Windows

2017-01-30 Thread Roberto Zanotto
That's strange. I'm 100% positive that i686-w64-mingw32 is 32bit and x86_64-w64-mingw32 is 64bit. The help message that you are citing seems to suggest that i686-w64-mingw32 can produce 64bit code with -m64 flag, but searching for info on that flag I found this: http://stackoverflow.com/questions

Re: [go-nuts] Re: Wrestling with Mingw64 on Windows

2017-01-30 Thread Arie van Wingerden
I absolutely installed Mingw64 and there are only 2 gcc.exe files: 1. gcc.exe (seems to be 32 bit) 2. i686-w64-mingw32-gcc.exe (seems to be 64 bit) in the help of this one it says: -m64Generate 64bit x86-64 code. so must be an x64 compiler ... 2017-01-30 17:45 GMT+01:00

[go-nuts] Re: Wrestling with Mingw64 on Windows

2017-01-30 Thread Roberto Zanotto
I suppose the error comes from the fact that you are using the 32bit compiler. *i686*-w64-mingw32-gcc.exe is 32bit, try with x86_64-w64-mingw32-gcc.exe If CC is set correctly, cgo should use that. If you are worried that gcc.exe is being used, temporarily move gcc.exe where cgo can't find it an