Sorry in advance if this is the wrong list for this.
I can build the gobot.io code below with the golang v1.8 and the standard
compiler:
go version go1.8 linux/amd64
go build -work -x hello_blink.go
But when I try to build with the GCC option in the same scenario it fails.
I am using GCC
gccgo (GCC) 7.0.1 20170314 (experimental) which has go1.8 support & all
paths are correct:
go build -work -x -compiler gccgo hello_blink.go
It can't seem to find paths that the gc code found and this leads to a link
error. The problem is
in a single file and if this file is commented out the code builds and
runs. Since this code is likely unused
it might be that the native compiler is detecting that automatically?
It didn't seem like any special options were needed to use the gccgo
compiler. I've used
it elsewhere in a similar way (different go code of course) without
problems.
Any ideas? Thanks.
//hello_blink
package main
import (
"time"
"gobot.io/x/gobot"
"gobot.io/x/gobot/drivers/gpio"
"gobot.io/x/gobot/platforms/firmata"
)
func main() {
firmataAdaptor := firmata.NewAdaptor("/dev/ttyACM0")
led := gpio.NewLedDriver(firmataAdaptor, "13")
work := func() {
gobot.Every(1*time.Second, func() {
led.Toggle()
})
}
robot := gobot.NewRobot("bot",
[]gobot.Connection{firmataAdaptor},
[]gobot.Device{led},
work,
)
robot.Start()
}
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.