You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
When implementing an example that uses C code snippet, I get the following error when compiling.
what am I doing wrong?
thank you
package main
// #include <stdio.h>
// void hello() {
// printf("Hello from C")
//}
import "C"
import (
"embed"
)
//go:embed all:frontend/dist
var assets embed.FS
func main() {
// Create an instance of the app structure
app := NewApp()
C.hello()
// Create application with options
err := wails.Run(&options.App{
Title: "myproject",
Width: 1024,
Height: 768,
AssetServer: &assetserver.Options{
Assets: assets,
},
BackgroundColour: &options.RGBA{R: 27, G: 38, B: 54, A: 1},
OnStartup: app.startup,
Bind: []interface{}{
app,
},
})
}
termial
Wails CLI v2.8.2
Executing: go mod tidy
• Generating bindings:
ERROR
# myproject
runtime.main_main·f: function main is undeclared in the main package
♥ If Wails is useful to you or your company, please consider sponsoring the project:
Beta Was this translation helpful? Give feedback.
All reactions