When something doesn’t compile it is helpful to share the error. That should work but it will only work on Windows - so if you are compiling it in WSL (Linux) that could be the problem.
Working on an emulation of one system in another will make things like this more problematic and I recommend you compile the windows app on a windows environment instead - cmd or even the MSYS2 setup recommended in the Fyne getting started guide. https://fyne.io/started