Closed atlasapplications closed 1 month ago
After more research I've found the solution.
C:\Users\[username]\AppData\Local\Programs\Swift
Runtimes
you'll see the version of Swift you have installed. Navigate into that directory until you see bin.
.dll
files in that directory need to be copy and pasted into the directory of your GDExtension
executables which most people make as bin
in the Godot project.I now see in the documentation where it states this but it was not obvious based off the examples, so perhaps this could be mentioned in more places like the posted GitHub example. Also, the path in the documentation states that Swift is in the Program Files
folder and the file structure is different so perhaps it's based on an older version of Swift for Windows.
I hope this is helpful for someone that runs into the same issue!
This info should add to the readme.
This info should add to the readme.
I agree!
Which document were you reading?
Which document were you reading?
Working in VS Code. These are the docs that helped me solve my problem, under the Windows
header.
As a suggestion for improving the docs, it states the Swift install path is under C:\Program Files\Swift
but for me at least it is under C:\Users\[username]\AppData\Local\Programs\Swift
.
I think it may be a reasonable suggestion that this info also be in the README
because the tutorial there only works on Mac without this information.
OS: Windows 11 Swift: 5.10.1
Overview Using the documentation, I recreated the example project but with Windows and I'm unable to get a working GDExtension for Swift. Everything compiles correctly and the binaries are produced as expected but when I put them in the bin folder Godot produces an error that states "Can't open dynamic library:...." "Error 126: The specified module could not be found."
Expected behavior There should be a Node that simply prints "Hello World from Swift."
Minimal Reproduction Sample This project shows my code. swift_example.zip