I have followed the installation instructions maybe 5 times. Each time I completely finish the guide and try to run a “Hello World” program. And get the error:
“Unable to find string.h”
“Could not build C module: SwiftShims”
I have looked through multiple guides on this. And have tried pretty much everything.
Any mind walking through the install with me at some point?
The unable to build SwiftShims indicates one of the following:
- your environment is not setup properly (which is automated by the installer at this point and thus should be fine as long as the command prompt was launched post-install)
- installation is silently failing, and the logs should contain the information on what happened
- you mis-understood the guide (people have installed using multiple different mechanisms before)
- the steps were carried out in an improper order (e.g. installing Swift before VS)
- you did not install Visual Studio properly
- you have multiple versions of Visual Studio installed and thus things are confused due to running from not the appropriate "Developer Command Prompt"
There is not enough information in what you are sharing to make a determination. Could you share the steps you followed, the logs from the installation (you can uninstall Swift, re-install by running
.\install.exe /l*vx log.txt to get the logs though I believe they are also in
%TEMP%), what versions of Visual Studio you have installed and how/where you are invoking