sqweek / dialog

Simple cross-platform dialog API for go-lang
ISC License
493 stars 76 forks source link

cross compile error win=>mac `cannot load github.com/sqweek/dialog/cocoa: no Go source files` #49

Closed senys closed 3 years ago

senys commented 3 years ago

I encountered following error. build github.com/sqweek/dialog/cocoa: cannot load github.com/sqweek/dialog/cocoa: no Go source files

Am i doing something wrong?

My Environment

Win10 64bit go1.13 using go module

@go.mod github.com/sqweek/dialog v0.0.0-20200601143742-43ea34326190

main

package main

import (
    "github.com/sqweek/dialog"
)
func main() {
    dialog.Message("%s", "Please select a file").Title("Hello world!").Info()
}

command (cross compile)

set goos=darwin set goarch=amd64 go build

result

build github.com/sqweek/dialog/cocoa: cannot load github.com/sqweek/dialog/cocoa: no Go source files

sqweek commented 3 years ago

But also note that dialog/cocoa contains the objective C code required to interface with Cocoa, so you'll need a proper cgo/objective C cross-compilation environment. I know cross-compilation is possible thanks to #47, but I've never done it myself so I can't offer any advice.

I'm going to close this issue as I don't believe it is related to dialog itself, but feel free to reopen it if you find more information which suggests otherwise.