compnerd/swift-win32

Failure with WinSDK

amine2233 opened this issue · 2 comments

Hello,

Thank you for your awesome work,

I have a failure when i try to use ninja -C build SwiftWin32 UICatalog

ninja: Entering directory `build'
FAILED: bin/SwiftCOM.dll Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/COMBase.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Shell.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Extensions/COMTypes+Extensions.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Extensions/String+Extensions.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Extensions/WinSDK+Extensions.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Implementation/Human/IFileOperationProgressSink.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Interfaces/Human/IBindCtx.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Interfaces/Human/IEnumMoniker.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Interfaces/Human/IEnumString.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Interfaces/Human/IEnumUnknown.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Interfaces/Human/IErrorLog.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Interfaces/Human/IFileOperation.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Interfaces/Human/IMalloc.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Interfaces/Human/IMoniker.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Interfaces/Human/IObjectWithPropertyKey.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Interfaces/Human/IOperationsProgressDialog.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Interfaces/Human/IPersist.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Interfaces/Human/IPersistStream.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Interfaces/Human/IPropertyBag2.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Interfaces/Human/IPropertyChange.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Interfaces/Human/IPropertyChangeArray.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Interfaces/Human/IRunningObjectTable.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Interfaces/Human/IShellItem.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Interfaces/Human/IStream.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Interfaces/Human/IWICBitmap.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Interfaces/Human/IWICBitmapClipper.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Interfaces/Human/IWICBitmapCodecInfo.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Interfaces/Human/IWICBitmapDecoder.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Interfaces/Human/IWICBitmapDecoderInfo.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Interfaces/Human/IWICBitmapEncoder.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Interfaces/Human/IWICBitmapEncoderInfo.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Interfaces/Human/IWICBitmapFlipRotator.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Interfaces/Human/IWICBitmapFrameDecode.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Interfaces/Human/IWICBitmapFrameEncode.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Interfaces/Human/IWICBitmapLock.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Interfaces/Human/IWICBitmapScaler.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Interfaces/Human/IWICBitmapSource.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Interfaces/Human/IWICColorContext.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Interfaces/Human/IWICColorTransform.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Interfaces/Human/IWICComponentInfo.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Interfaces/Human/IWICFastMetadataEncoder.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Interfaces/Human/IWICFormatConverter.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Interfaces/Human/IWICImagingFactory.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Interfaces/Human/IWICMetadataQueryReader.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Interfaces/Human/IWICMetadataQueryWriter.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Interfaces/Human/IWICPalette.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Interfaces/Human/IWICStream.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Interfaces/ITypeComp.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Interfaces/ITypeInfo.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Interfaces/ITypeLib.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Interfaces/IUnknown.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Support/Error.swift.obj Sources/CMakeFiles/SwiftCOM.dir/__/Packages/SwiftCOM/Sources/SwiftCOM/Support/RawTyped.swift.obj swift/SwiftCOM.swiftmodule lib/SwiftCOM.lib
cmd.exe /C "cd . && C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\swiftc.exe -output-file-map Sources\CMakeFiles\SwiftCOM.dir\Release\output-file-map.json -incremental -j 8 -emit-library -o bin\SwiftCOM.dll -module-name SwiftCOM -module-link-name SwiftCOM -emit-module -emit-module-path swift\SwiftCOM.swiftmodule -emit-dependencies -DSwiftCOM_EXPORTS -sdk %SDKROOT% -O -libc MD  @CMakeFiles\SwiftCOM.rsp    -Xlinker -implib:lib\SwiftCOM.lib  && cd ."
../Packages/SwiftCOM/Sources/SwiftCOM/COMBase.swift:8:8: error: cannot load underlying module for 'WinSDK'
import WinSDK
       ^
../Packages/SwiftCOM/Sources/SwiftCOM/COMBase.swift:8:8: error: cannot load underlying module for 'WinSDK'
import WinSDK
       ^
../Packages/SwiftCOM/Sources/SwiftCOM/COMBase.swift:8:8: error: cannot load underlying module for 'WinSDK'
import WinSDK
       ^
../Packages/SwiftCOM/Sources/SwiftCOM/COMBase.swift:8:8: error: cannot load underlying module for 'WinSDK'
import WinSDK
       ^
../Packages/SwiftCOM/Sources/SwiftCOM/COMBase.swift:8:8: error: cannot load underlying module for 'WinSDK'
import WinSDK
       ^
../Packages/SwiftCOM/Sources/SwiftCOM/COMBase.swift:8:8: error: cannot load underlying module for 'WinSDK'
import WinSDK
       ^
../Packages/SwiftCOM/Sources/SwiftCOM/COMBase.swift:8:8: error: cannot load underlying module for 'WinSDK'
import WinSDK
       ^
../Packages/SwiftCOM/Sources/SwiftCOM/COMBase.swift:8:8: error: cannot load underlying module for 'WinSDK'
import WinSDK
       ^
ninja: build stopped: subcommand failed.

can you help me please to esolve this issue ?

Thanks

That seems like you didn't follow the instructions for installation (copying of the modulemap into the WinSDK installation). See https://github.com/compnerd/swift-build/blob/master/docs/GettingStartedWindows.md

I am going to close this issue for now. If the instructions did not help and you are still facing the issue, please feel free to reopen the issue.