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

不支持GOARCH=386下编译 #22

Open
kjcxmx opened this issue Apr 10, 2023 · 0 comments
Open

不支持GOARCH=386下编译 #22

kjcxmx opened this issue Apr 10, 2023 · 0 comments

Comments

@kjcxmx
Copy link

kjcxmx commented Apr 10, 2023

CGO_ENABLED=0 GOOS=windows GOARCH=386 go build

github.com/amitbet/vnc2video

vendor/github.com/amitbet/vnc2video/encoding_zrle.go:46:53: 0x00ff000000 (untyped int constant 4278190080) overflows int

这个错误通常表示在将一个无类型的整型常量赋值给 int 类型变量时,该常量的值超出了 int 类型的范围。在这个例子中,错误信息指出 0x00ff000000 这个无类型整型常量溢出了 int 类型的最大值。

解决方法是将这个常量转换为正确的类型,例如可以使用 uint32_t 类型来表示该常量,也可以使用移位运算符来代替该常量表示方式。例如,将 significant&0x00ff000000 更改为 (significant & (0xffu << 24)) 就可以避免编译错误。

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