wxGo | Golang wxWidgets Wrapper
kandi X-RAY | wxGo Summary
kandi X-RAY | wxGo Summary
[AppVeyor Build status] For Golang 1.10.0 and 1.9.4, there is a "Invalid flag" issue which causes the build fails. Please check [Here] for workaround. This section will introduce how to customize wxGo. wxGo needs a 2-phase compilation. The first is the SWIG phase, that is using [SWIG] to generate the wrapper code. And the second is the Go phase, which has been described above.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of wxGo
wxGo Key Features
wxGo Examples and Code Snippets
Community Discussions
Trending Discussions on wxGo
QUESTION
I use
import "github.com/dontpanic92/wxGo/wx"
in a program that can run with or without a GUI.
i.e. you might run it like:
./program --gui true
or
./program --gui false
When running on linux with gui false I'd like to avoid having to compile all of wxGo/wx.
How can I check in the same code to git so that it will compile on Mac or linux just fine.
i.e. right now when I compile on linux I have to comment out any reference to wxGo/wx
...ANSWER
Answered 2017-Oct-24 at 15:05If you want to exclude specific Go files from building on certain operating system, architectures, Go versions or if certain tags are specified during compilation, these are your options:
If you want a file to only build on Linux, append
_linux
to the file name, e.g.gui_linux.go
. It is also possible to specify an architecture, or both, e.g.gui_windows_amd64.go
.Add a
//+build ...
comment at the top of your Go file, e.g.// +build linux,386
.
See https://golang.org/pkg/go/build/#hdr-Build_Constraints for details.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install wxGo
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page