MacOSX Cross-compiling win_x86 Golang Program

Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed.

Made a number of smooth interface to receive the market, unfortunately only a DLL file, now with the Mac Book Pro, virtual machine running XP card that is screaming babies. So I lit up my love toss heart.

The idea is that the DLL is actively pushing the message to the form via the win's message mechanism, and Golang is able to control the message loop through a third-party Code Creation window, and also a way to invoke the DLL.

You can turn the data for the Golang interface into a Web service. Tossing Golang is because it's so easy to make a webs, and it can be written on a Mac without opening vs.

Running the win program on the Mac can take wine to dry, first take the number of Chang 5.3 Run is normal pull to the data, so you can basically determine that this path is available.


Go Run script:

Export-p goos=windows export-p goarch=386export-p gopath= $PWDexport-P gobin= $PWD/binpushd srcgo Install GITHUB.COM/LXN /wingo Install Github.com/lxn/walkpopdgo Run Main.go

The following prompt appears when compiling the runtime:

Go build runtime:windows/386 must be bootstrapped using Make.bash


The solution is to " stick the wrong tips on Google to search!"

Because I used DMG to install the Golang, except Darwin under the compiler, all the other platforms are wood. Compile manually as follows:

CD $GOROOT/srcsudo goos=windows goarch=386./make.bash

Ref

http://tonybai.com/2014/10/20/cross-compilation-with-golang/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.