[swift-users] Compile error trying to follow Swift for Windows MSVC instructions

Eric Wing ewmailing at gmail.com
Tue Nov 28 12:00:38 CST 2017

On 11/14/17, Saleem Abdulrasool <compnerd at compnerd.org> wrote:
> I’ve not used the MSVC build mode very much.  I suspect that this is a name
> lookup failure and needs a namespace qualification.  I’ll look into
> tweaking that when I’m near a computer.  In the mean time, I recommend
> using the cross-compile or possibly trying with clang-cl.

Thank you for the response.
I installed the nightly build of LLVM for Windows (64-bit) and tried clang-cl.

The compile got stuck building LLVM/Clang in step 6 of the
instructions. The error is pasted below. Any idea how to fix this?

Also, are there any deeper instructions on the cross-compiling
instructions? This is all very foreign to me for Windows since the
usual workflow is around Visual Studio. Reading the fist step shows
the keyword "export", which is not a valid keyword in the Windows
cmd.exe. So I'm already missing a lot of needed context.


[252/2299] Building CXX object
FAILED: tools/clang/lib/DirectoryWatcher/CMakeFiles/clangDirectoryWatcher.dir/DirectoryWatcher.cpp.obj
C:\LLVM64\bin\clang-cl.exe  /nologo -DGTEST_HAS_RTTI=0 -DUNICODE
-IC:\Source\SWIFT\llvm\tools\clang\include -Itools\clang\include
-Iinclude -IC:\Source\SWIFT\llvm\include
-fms-compatibility-version=19.00 -Z7 /Zc:inline /Zc:strictStrings /Oi
/Zc:rvalueCast /Brepro -Wall -W -Wno-unused-parameter -Wwrite-strings
-Wcast-qual -Wmissing-field-initializers -Wcovered-switch-default
-Wdelete-non-virtual-dtor -Wstring-conversion /MD /O1 /Ob1   -UNDEBUG
/EHs-c- /GR- /showIncludes
-c C:\Source\SWIFT\llvm\tools\clang\lib\DirectoryWatcher\DirectoryWatcher.cpp
In file included from
In file included from
 error: unknown type name 'timespec'
    timespec ModTime;
 error: unknown type name 'timespec'
    timespec ModTime;
2 errors generated.
[254/2299] Building CXX object
ninja: build stopped: subcommand failed.

More information about the swift-users mailing list