Reputation: 55
Is there any way to load the syscall.NewLazyDLL in Ubuntu?
I tried:
GOOS=windows GOARCH=amd64 go build -ldflags "-w -s" -o myFileName *.go
but the syscall.NewLazyDLL is not found.
var (
mod = syscall.NewLazyDLL("user32.dll")
procGetWindowText = mod.NewProc("GetWindowTextW")
)
My goal is to load the "windows" syscall functions, but from my main Ubuntu OS, so I dont need to switch to Windows to code. Is there any way Ubuntu can call the Windows functions from syscall.NewLazyDLL or do I have to write code in Windows for this?
Upvotes: 0
Views: 1895
Reputation: 21
Of course you have to be on Windows, you are wanting to develop for Windows and not Linux using syscall.NewLazyDLL("user32.dll"). Install a virtual machine.
Upvotes: 1