<div><div dir="auto">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.</div><br><div class="gmail_quote"><div>On Tue, Nov 14, 2017 at 1:05 PM Michael Gottesman &lt;<a href="mailto:mgottesman@apple.com">mgottesman@apple.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">+CC Compnerd<br>
<br>
&gt; On Nov 9, 2017, at 10:36 AM, Eric Wing via swift-users &lt;<a href="mailto:swift-users@swift.org" target="_blank">swift-users@swift.org</a>&gt; wrote:<br>
&gt;<br>
&gt; I&#39;m trying to build Swift for Windows with Visual Studio using the<br>
&gt; directions found here:<br>
&gt; <a href="https://github.com/apple/swift/blob/master/docs/Windows.md" rel="noreferrer" target="_blank">https://github.com/apple/swift/blob/master/docs/Windows.md</a><br>
&gt;<br>
&gt; I&#39;m following the MSVC section for directions. I am stuck in step 6.<br>
&gt; LLVM/Clang/Compiler-RT<br>
&gt;<br>
&gt; I seem to be hitting a C++ error in the code in IndexDataStore.h. Any<br>
&gt; ideas on how to get around this?<br>
&gt;<br>
&gt;<br>
&gt; C:\PROGRA~2\MICROS~1\2017\COMMUN~1\VC\Tools\MSVC\1411~1.255\bin\Hostx64\x64\cl.exe<br>
&gt; /nologo /TP -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE<br>
&gt; -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE<br>
&gt; -D_CRT_SECURE_NO_WARNINGS -D_GNU_SOURCE -D_HAS_EXCEPTIONS=0<br>
&gt; -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE<br>
&gt; -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS<br>
&gt; -Itools\clang\lib\Index -IC:\Source\SWIFT\llvm\tools\clang\lib\Index<br>
&gt; -IC:\Source\SWIFT\llvm\tools\clang\include -Itools\clang\include<br>
&gt; -Iinclude -IC:\Source\SWIFT\llvm\include /DWIN32 /D_WINDOWS<br>
&gt; /Zc:inline /Zc:strictStrings /Oi /Zc:rvalueCast /W4 -wd4141 -wd4146<br>
&gt; -wd4180 -wd4244 -wd4258 -wd4267 -wd4291 -wd4345 -wd4351 -wd4355<br>
&gt; -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4800<br>
&gt; -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245<br>
&gt; -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204<br>
&gt; -wd4577 -wd4091 -wd4592 -wd4319 -wd4324 -w14062 -we4238 /MD /O1 /Ob1<br>
&gt; -UNDEBUG  /EHs-c- /GR- /showIncludes<br>
&gt; /Fotools\clang\lib\Index\CMakeFiles\clangIndex.dir\IndexDataStore.cpp.obj<br>
&gt; /Fdtools\clang\lib\Index\CMakeFiles\clangIndex.dir\clangIndex.pdb /FS<br>
&gt; -c C:\Source\SWIFT\llvm\tools\clang\lib\Index\IndexDataStore.cpp<br>
&gt; C:\Source\SWIFT\llvm\tools\clang\include\clang/Index/IndexDataStore.h(41):<br>
&gt; error C3646: &#39;ModTime&#39;: unknown override specifier<br>
&gt; C:\Source\SWIFT\llvm\tools\clang\include\clang/Index/IndexDataStore.h(41):<br>
&gt; error C4430: missing type specifier - int assumed. Note: C++ does not<br>
&gt; support default-int<br>
&gt; C:\Source\SWIFT\llvm\tools\clang\include\clang/Index/IndexDataStore.h(74):<br>
&gt; error C3646: &#39;ModTime&#39;: unknown override specifier<br>
&gt; C:\Source\SWIFT\llvm\tools\clang\include\clang/Index/IndexDataStore.h(74):<br>
&gt; error C4430: missing type specifier - int assumed. Note: C++ does not<br>
&gt; support default-int<br>
&gt; C:\Source\SWIFT\llvm\tools\clang\lib\Index\IndexDataStore.cpp(164):<br>
&gt; error C2039: &#39;ModTime&#39;: is not a member of<br>
&gt; &#39;clang::index::AbstractDirectoryWatcher::Event&#39;<br>
&gt; C:\Source\SWIFT\llvm\tools\clang\include\clang/Index/IndexDataStore.h(38):<br>
&gt; note: see declaration of<br>
&gt; &#39;clang::index::AbstractDirectoryWatcher::Event&#39;<br>
&gt; C:\Source\SWIFT\llvm\tools\clang\lib\Index\IndexDataStore.cpp(164):<br>
&gt; error C2039: &#39;__this&#39;: is not a member of<br>
&gt; &#39;clang::index::AbstractDirectoryWatcher::Event&#39;<br>
&gt; C:\Source\SWIFT\llvm\tools\clang\include\clang/Index/IndexDataStore.h(38):<br>
&gt; note: see declaration of<br>
&gt; &#39;clang::index::AbstractDirectoryWatcher::Event&#39;<br>
&gt; [2723/3603] Building CXX object<br>
&gt; tools\clang\lib\Index\CMakeFiles\clangIndex.dir\IndexingContext.cpp.obj<br>
&gt; ninja: build stopped: subcommand failed.<br>
&gt;<br>
&gt;<br>
&gt; Note: I&#39;m using VS2017 instead of VS2015 because it&#39;s supposed to have<br>
&gt; better C++ conformance.<br>
&gt;<br>
&gt; I also want to note, building Debug hits a different fatal error where<br>
&gt; MSVC aborts saying you must compile with /bigobj because the files are<br>
&gt; too large. I changed my build and then hit the above compile error<br>
&gt; with IndexDataStore.h. I then tried building a release version without<br>
&gt; /bigobj, but I hit the same compile error with IndexDataStore.h.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Also, can somebody clarify what the differences are between the<br>
&gt; different build approaches in the document (clang vs. MSVC vs.<br>
&gt; clang-cl). Will these all produce binaries that are interoperable with<br>
&gt; each other and allow me to link against regular MSVC built C<br>
&gt; libraries? And do one of these clang options need MSVC&#39;s clang-C2?<br>
&gt;<br>
&gt; And also, what is Compiler-RT and since it is optional, what do I lose<br>
&gt; if I skip it?<br>
&gt;<br>
&gt; And finally, why is the Win10 SDK needed? Doesn&#39;t that mean it won&#39;t<br>
&gt; work on Win7 or Win8? What could Swift need that requires Win10 APIs?<br>
&gt;<br>
&gt; Thanks,<br>
&gt; Eric<br>
&gt; _______________________________________________<br>
&gt; swift-users mailing list<br>
&gt; <a href="mailto:swift-users@swift.org" target="_blank">swift-users@swift.org</a><br>
&gt; <a href="https://lists.swift.org/mailman/listinfo/swift-users" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-users</a><br>
<br>
</blockquote></div></div><div dir="ltr">-- <br></div><div class="gmail_signature" data-smartmail="gmail_signature">Saleem Abdulrasool<br>compnerd (at) compnerd (dot) org</div>