On Tue, Apr 18, 2017 at 11:00 PM, hui zhang <fastfad...@gmail.com> wrote:
> I want to set different flags for different os in cgo,  how to do that in
> cgo?
>
>
>> //#cgo amd64 darwin CFLAGS: -Dxxx
>> //#cgo amd64 darwin CXXFLAGS: -Dxxx
>> //#cgo amd64 darwin LDFLAGS: -Lxxx
>> //#cgo arm darwin CFLAGS: -Dxxx
>> //#cgo arm darwin CXXFLAGS: -Dxxx
>> //#cgo arm darwin LDFLAGS: -Lxxx
>>
>> //#include "c2go.h"
>> import "C"

Yes, that is how to do it, as documented at https://golang.org/cmd/cgo.

Ian

-- 
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