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

can't use go build, show too many errors #68

Open
2311586094 opened this issue Feb 15, 2023 · 0 comments
Open

can't use go build, show too many errors #68

2311586094 opened this issue Feb 15, 2023 · 0 comments

Comments

@2311586094
Copy link

if your work use this file, when you go build to make a exe, there will be

undefined: syscall.SIGUSR1
undefined: syscall.SIGUSR2
undefined: syscall.SIGTSTP
undefined: syscall.SIGUSR1
undefined: syscall.SIGUSR2
undefined: syscall.SIGTSTP
undefined: syscall.SIGUSR1
undefined: syscall.SIGUSR2
undefined: syscall.SIGTSTP
undefined: syscall.Kill
too many errors

Because these constants are not available in Windows,
For normal operation, you can modify the file in GOROOT \ src \ syscall \ types_windows.go
Anyway, these constants are useless under windows

var signals = [...]string{      //It already exists, usually in line 67 of the document
    // Omit some rows

    /** change start */
    16: "SIGUSR1",
    17: "SIGUSR2",
    18: "SIGTSTP",
    /** change end */
}


/** change start */
func Kill(...interface{}) {      //It doesn't exist, you can add it after last change
    return;
}
const (
    SIGUSR1 = Signal(0x10)
    SIGUSR2 = Signal(0x11)
    SIGTSTP = Signal(0x12)
)
/** change end */

Method from: https://learnku.com/articles/51696

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant