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 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/34890796/m64-and-m32-flags/34891019
> which is the same error that you are getting.
> Install and use x86_64-w64-mingw32 if you can, I installed it through 
> cygwin on my system and cgo just works.
>
> On Monday, January 30, 2017 at 5:54:25 PM UTC+1, Arie van Wingerden wrote:
>>
>> 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:
>>         -m64    Generate 64bit x86-64 code.
>>      so must be an x64 compiler ...
>>
>>
>> 2017-01-30 17:45 GMT+01:00 Roberto Zanotto <roby...@gmail.com>:
>>
>>> 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 and 
>>> try to compile again.
>>>
>>>
>>> On Monday, January 30, 2017 at 4:32:34 PM UTC+1, Arie van Wingerden 
>>> wrote:
>>>>
>>>> I try to use CGO on Windows
>>>>
>>>> I installed Mingw64 from here:
>>>>    
>>>> https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Automated%20Builds/
>>>>
>>>> My Go env vars are like so:
>>>>    set CC=i686-w64-mingw32-gcc.exe
>>>>    set GOROOT=e:\programs\go64
>>>>    set GOPATH=e:\src\go
>>>>    set GOOS=windows
>>>>    set GOARCH=amd64
>>>>    set GOBIN=e:\src\go\bin64
>>>>    set MINGWPATH=e:\programs\mingw64\mingw32\bin
>>>>    set PATH=%GOROOT%\%MINGWPATH%\bin;%PATH%
>>>>
>>>> Is there a way to see if Go does indeed use i686-w64-mingw32-gcc.exe 
>>>> and not gcc.exe?
>>>>
>>>> I try to go run the attached main.go and get this error:
>>>>    E:\src\go\src\ui-andlabs>go run main.go
>>>>    # github.com/andlabs/ui
>>>>    cc1.exe: sorry, unimplemented: 64-bit mode not compiled in
>>>> which seems to tell me that something is wrong with 64 bit mode; but 
>>>> what is it...
>>>>
>>>> Any idea?
>>>>    
>>>>
>>>>
>>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "golang-nuts" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to golang-nuts...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to