second-state / WasmEdge-go

The GO language SDK and API for WasmEdge
https://www.secondstate.io/articles/extend-golang-app-with-webassembly-rust/
Apache License 2.0
107 stars 16 forks source link

Problems on Windows 10 #44

Open ErdemTDU opened 10 months ago

ErdemTDU commented 10 months ago

Hello,

While I am trying to use wasmedge sdk for windows 10, I got the error. Have you any suggestion for that? I have done the required steps for installation.

Thanks in advance!

hydai commented 10 months ago

Hi @ErdemTDU Please share the full log of the error and how to reproduce steps.

ErdemTDU commented 10 months ago

Hi @hydai,

I have tried the base example of your repo to see what happens in initial steps.

  1. Error is in different example
    • "go-link-3182996452\000023.o: in function `_cgo_fbad98d1796e_Cfunc_WasmEdge_VMValidate'"..........
    • /tmp/go-build/cgo-gcc-prolog:700: undefined reference to `__imp_WasmEdge_VMValidate' collect2.exe: error: ld returned 1 exit status

I have an issue for all linked libraries for go sdk thats why I can not compile my code.

  1. Error in fibo example: ...\wasmedge\ast.go:3:11: fatal error: wasmedge/wasmedge.h: No such file or directory // #include <wasmedge/wasmedge.h> ^~~~~ compilation terminated.

Sometimes, .h can not be seen.

WasmEdge version: 0.13.4 Go-SDK: 0.13.4 Go version: 1.20.11

hydai commented 10 months ago

It looks like the this doesn't contain the windows related part: https://github.com/second-state/WasmEdge-go/blob/master/wasmedge/cgo.go#L3-L6

Do you know how to link with CGO on the Windows platform?

ErdemTDU commented 10 months ago

Hi @hydai,

I have detected the same issue, will check soon.

Thanks,