build error:pkg/edge/create_env_native.go:26:2: undefined: hr
songdemei opened this issue · 1 comments
Description
build cmd:
wails build -platform=windows/amd64 -webview2=embed -debug -tags "native_webview2loader"
To Reproduce
1.wails build -platform=windows/amd64 -webview2=embed -debug -tags "native_webview2loader"
error:
Wails CLI v2.9.2
Build Options
Platform(s) | windows/amd64
Compiler | /data/go123/bin/go
Skip Bindings | false
Build Mode | debug
Devtools | true
Frontend Directory | /data/gopath/suxuantech.cn/demo/frontend
Obfuscated | false
Skip Frontend | false
Compress | false
Package | true
Clean Bin Dir | false
LDFlags |
Tags | [native_webview2loader]
Race Detector | false
Building target: windows/amd64
• Generating bindings: 2024/11/02 12:03:08 KnownStructs: frontend.FileFilter frontend.OpenDialogOptions structs.DbConfig structs.Field structs.ImpConfig structs.ImportParams structs.Shopset
structs.DbConfig
KnownStructs: frontend.FileFilter frontend.OpenDialogOptions structs.DbConfig structs.Field structs.ImpConfig structs.ImportParams structs.Shopset
structs.DbConfig
KnownStructs: frontend.FileFilter frontend.OpenDialogOptions structs.DbConfig structs.Field structs.ImpConfig structs.ImportParams structs.Shopset
structs.ImpConfig
Done.
• Installing frontend dependencies: Done.
• Compiling frontend: Done.
• Generating application assets: Done.
• Compiling application: # github.com/wailsapp/go-webview2/pkg/edge
../../pkg/mod/github.com/wailsapp/go-webview2@v1.0.16/pkg/edge/create_env_native.go:26:2: undefined: hr
../../pkg/mod/github.com/wailsapp/go-webview2@v1.0.16/pkg/edge/create_env_native.go:36:5: undefined: hr
../../pkg/mod/github.com/wailsapp/go-webview2@v1.0.16/pkg/edge/create_env_native.go:38:24: undefined: hr
ERROR exit status 1
ERROR exit status 1
♥ If Wails is useful to you or your company, please consider sponsoring the project:
https://github.com/sponsors/leaanthony
Expected behaviour
.....
Screenshots
No response
Attempted Fixes
No response
System Details
Wails Doctor
# Wails
Version | v2.9.2
# System
┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
| OS | MacOS |
| Version | 12.7.3 |
| ID | 21H1015 |
| Go Version | go1.23.1 |
| Platform | darwin |
| Architecture | amd64 |
| CPU | Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz |
| GPU | Chipset Model: Intel Iris Pro Type: GPU Bus: Built-In VRAM (Dynamic, Max): 1536 MB Vendor: Intel Device ID: 0x0d26 Revision ID: 0x0008 Metal Family: Supported, Metal GPUFamily macOS 1 Displays: Color LCD: Display Type: Built-In Retina LCD Resolution: 2880 x 1800 Retina Framebuffer Depth: 24-Bit Color (ARGB8888) Main Display: Yes Mirror: Off Online: Yes Automatically Adjust Brightness: Yes Connection Type: Internal |
| Memory | 16GB |
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
# Dependencies
┌─────────────────────────────────────────────────────────────────┐
| Dependency | Package Name | Status | Version |
| Xcode command line tools | N/A | Installed | 2395 |
| Nodejs | N/A | Installed | 18.18.2 |
| npm | N/A | Installed | 10.5.0 |
| *Xcode | N/A | Available | |
| *upx | N/A | Installed | upx 3.96 |
| *nsis | N/A | Available | |
└──────────────────── * - Optional Dependency ────────────────────┘
# Diagnosis
Optional package(s) installation details:
- Xcode: Available at https://apps.apple.com/us/app/xcode/id497799835
- nsis : More info at https://wails.io/docs/guides/windows-installer/
SUCCESS Your system is ready for Wails development!
♥ If Wails is useful to you or your company, please consider sponsoring the project:
Additional context
No response
Thanks for raising this! I've updated go-webview2 with the fix and pushed an update to the master branch of Wails which should fix it. LMK how you go!