there are a few problems with your project as presented:
- your .c file has a (mistyped) directive to not build on linux on
line 1: "/ build !linux". this needs to go
- your a_non_linux.go file is not idiomatic. it makes much more sense
to specialize the linux code in a separate file and leave al
Yes, probably.
Please do file an issue on github, thanks.
-s
sent from my droid
On Jul 30, 2016 4:33 AM, wrote:
> Hi Sebastien,
>
> Thanks for the response but this does not work completely. The issue is
> demonstrated in a package here:
>
> github.com/satyamsi/cbuilds/a
>
> One file a.go buil
Hi Sebastien,
Thanks for the response but this does not work completely. The issue is
demonstrated in a package here:
github.com/satyamsi/cbuilds/a
One file a.go build for linux and has an import "C" - this works fine.
On non-linux, a_non_linux.go gets used. As this file doesnt use anything C
Satyam,
On Fri, Jul 29, 2016 at 3:25 AM, wrote:
> Hi Folks,
>
> If I need to compile c files in a package conditionally based on the OS
> that I am running on, seems like +build is the right way to do it. I can
> have two versions of the file:
>
> somefile_linux.go which has // +build linux and
Hi Folks,
If I need to compile c files in a package conditionally based on the OS
that I am running on, seems like +build is the right way to do it. I can
have two versions of the file:
somefile_linux.go which has // +build linux and also an import "C"
and
somefile_nonlinux.go which has //