Skip to content

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

Description

@2311586094

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions