We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I use wails build -platform windows, if use CGO, it can't build.
wails build -platform windows
fcying@home:~/test/wails $ wails build -platform windows Wails CLI v2.9.1 # Build Options Platform(s) | windows Compiler | /usr/local/bin/go Skip Bindings | false Build Mode | production Devtools | false Frontend Directory | /home/fcying/test/wails/frontend Obfuscated | false Skip Frontend | false Compress | false Package | true Clean Bin Dir | false LDFlags | Tags | [] Race Detector | false # Building target: windows/amd64 • Generating bindings: Done. • Installing frontend dependencies: Done. • Compiling frontend: Done. • Generating application assets: Done. • Compiling application: # wails ./main.go:16:9: undefined: NewApp ERROR exit status 1 ERROR exit status 1
after set CC CXX
export CXX=x86_64-w64-mingw32-g++ export CC=x86_64-w64-mingw32-gcc wails build -platform windows Wails CLI v2.9.1 # Build Options Platform(s) | windows Compiler | /usr/local/bin/go Skip Bindings | false Build Mode | production Devtools | false Frontend Directory | /home/fcying/test/wails/frontend Obfuscated | false Skip Frontend | false Compress | false Package | true Clean Bin Dir | false LDFlags | Tags | [] Race Detector | false # Building target: windows/amd64 # Building target: windows/amd64 • Generating bindings: ERROR # runtime/cgo gcc_linux_amd64.c: In function ‘_cgo_sys_thread_start’: gcc_linux_amd64.c:57:9: error: unknown type name ‘sigset_t’; did you mean ‘_sigset_t’? 57 | sigset_t ign, oset; | ^~~~~~~~ | _sigset_t gcc_linux_amd64.c:62:9: error: implicit declaration of function ‘sigfillset’ [-Werror=implicit-function-declaration] 62 | sigfillset(&ign); | ^~~~~~~~~~ gcc_linux_amd64.c:57:23: error: unused variable ‘oset’ [-Werror=unused-variable] 57 | sigset_t ign, oset; | ^~~~ cc1: all warnings being treated as errors exit status 1 ERROR # runtime/cgo gcc_linux_amd64.c: In function ‘_cgo_sys_thread_start’: gcc_linux_amd64.c:57:9: error: unknown type name ‘sigset_t’; did you mean ‘_sigset_t’? 57 | sigset_t ign, oset; | ^~~~~~~~ | _sigset_t gcc_linux_amd64.c:62:9: error: implicit declaration of function ‘sigfillset’ [-Werror=implicit-function-declaration] 62 | sigfillset(&ign); | ^~~~~~~~~~ gcc_linux_amd64.c:57:23: error: unused variable ‘oset’ [-Werror=unused-variable] 57 | sigset_t ign, oset; | ^~~~ cc1: all warnings being treated as errors exit status 1
package main /* void test() { } */ import "C"
cross build work fine
No response
wails doctor Wails Doctor # Wails Version | v2.9.1 Package Manager | apt # System ┌───────────────────────────────────────────────────┐ | OS | Debian GNU/Linux | | Version | 12 | | ID | debian | | Go Version | go1.22.3 | | Platform | linux | | Architecture | amd64 | | CPU | AMD Ryzen 7 5700X 8-Core Processor | | GPU | Unknown | | Memory | 20GB | └───────────────────────────────────────────────────┘ # Dependencies ┌──────────────────────────────────────────────────────────────────────┐ | Dependency | Package Name | Status | Version | | *docker | docker.io | Available | 20.10.24+dfsg1-1+b3 | | gcc | build-essential | Installed | 12.9 | | libgtk-3 | libgtk-3-dev | Installed | 3.24.38-2~deb12u1 | | libwebkit | libwebkit2gtk-4.0-dev | Installed | 2.44.3-1~deb12u1 | | npm | npm | Installed | 10.5.0 | | *nsis | nsis | Available | 3.08-3+deb12u1 | | pkg-config | pkg-config | Installed | 1.8.1-1 | └────────────────────── * - Optional Dependency ───────────────────────┘ # Diagnosis Optional package(s) installation details: - docker: sudo apt install docker.io - nsis: sudo apt install nsis SUCCESS Your system is ready for Wails development!
### Additional context _No response_
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Description
I use
wails build -platform windows
, if use CGO, it can't build.after set CC CXX
To Reproduce
Expected behaviour
cross build work fine
Screenshots
No response
Attempted Fixes
No response
System Details
The text was updated successfully, but these errors were encountered: