-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't compile example #711
Comments
With |
You won't be able to build with the x86 toolset, this project currently is not 32-bit clean. Furthermore, once #699 is merged, the project exposes limitations in the Swift toolchain wrt calling convention handling that will prevent the correct argument handling resulting in a failure from within the callbacks from Win32 to handle the events. The errors sound like you didn't follow the installation instructions correctly and the deployment of the modulemaps failed which results in being unable to access the system headers. I would say that you should uninstall Swift, reinstall Visual Studio (ensuring that you add the necessary C/C++ components or just install the C/C++ workload support) and then re-install the Swift toolchain. |
I don't build with the x86 toolset, I'm trying to execute these commands from https://www.swift.org/getting-started/ (support files).
I tried reinstalling VS, but this doesn't help. I'm using VS2022 with the latest MSVC, it's not a problem? |
I think that this is the problem. You aren't installing all the necessary pieces of Visual Studio. The necessary components are listed on the getting started page. The easiest thing to do is to just install the C++ workload. Once that is installed properly, reinstall Swift. |
Thanks, I didn't install Win 10 SDK (instead installed Win 11 SDK).
|
With |
I think that you’re using an older CMake. Make sure that you’re using the latest release. The symlink error is not due to the directory not existing. You are not running as administrator nor do you have a GPO applied to allow you to create symbolic links. Yet another alternative is to enable developer mode. This is all due to setup issues, most of this is covered in depth on the swift forums. Please search through them in the future. |
It was not a problem with the installation. I ran the Cmake from the folder of the project itself, but I needed swift-win32. Maybe add this to the readme because it seems non-obvious? |
Patches to improve the documentation are welcome :) |
Ok, I will open PR later) |
The generated binary can be run on other Windows 10 machines if you copy the runtime and the other DLLs. The runtime redistributable is packaged as a separate MSI though it's not available as a separate download currently. |
So, Swift doesn't allow to generate fat binaries with runtime like .net? |
Correct. Static linking isn't yet possible for Windows, so that is also not yet an option. You should be able to build tooling to package up the dependencies though (this was the approach that Swift used initially on other platforms as well). |
I have done and installed everything as in getting started on swift.org.
But when I try to execute make command (copied from Readme) I have this error
What I'm doing wrong?
The text was updated successfully, but these errors were encountered: