Closed swill closed 9 years ago
I'm not sure why this is a problem. You use esc to create a .go file. Then you compile it however you want, esc has nothing to do with it at that point.
What did you do? What happened? What did you expect to happen?
I had the expectation that I was going to have to pass the static.go
file into the cross compiler in order for it to be picked up and used. Like in your example go run main.go static.go
.
I just tried the following and it actually worked, but I really don't understand how.
$ esc -o static.go static
$ gox -output="bin/{{.Dir}}_{{.OS}}_{{.Arch}}"
$ cp bin/binary_of_program ~/
$ cd ~/
$ ./binary_of_program
I must have just missed the details of how some of this is working, but kudos for your implementation because I was totally over thinking how I was going to get the cross compiler to access the static.go
file.
I am trying to figure out how to handle passing the 'output' file to a cross compiler so I can cross compile my binary while using this library.
I am fine with working with either
goxc
orgox
for cross compiling so if you have a solution for either of those cross compilers, I would be interested in how you do it.Thanks...