Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

there is no cmd:#define,so how can i compile my program with change any code at any platform? #40997

rhettli opened this issue Aug 24, 2020 · 2 comments


Copy link

@rhettli rhettli commented Aug 24, 2020

go version go1.14.2 darwin/amd64

the code below work correct on win,but fail on mac,

cmd.SysProcAttr = &syscall.SysProcAttr{}
// HideWindow attr was not exist on mac platfrom ,so i had to change it when i compile code on mac platfrom.
cmd.HideWindow = true

if there have #define cmd: just change like :

cmd.SysProcAttr = &syscall.SysProcAttr{}
#ifdefine _WINDOWS
cmd.HideWindow = true

And how can i compile the program without change any code on any playform?

Copy link

@acln0 acln0 commented Aug 24, 2020

In the future, please use one of these venues for questions rather than the issue tracker.

Copy link

@davecheney davecheney commented Aug 24, 2020

Thank you for raising this issue. Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.

For asking questions, see:

@davecheney davecheney closed this Aug 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.