I need more detailed installation instructions for Swift for Windows.

Jun 29, 2016 at 1:32 AM
I am running Windows 10 on an AMD 64 bit computer.

I have tried several times to install Swift for Windows it and failed each time.

I downloaded and installed the Community version of Visual Studio 2015. The installer placed the executables in the Program Files X86 folder under a Microsoft Visual Studio 14.0 folder

I installed Swift for windows which installed under a "Swiftforwindows" folder.

Help.
Jim Latham
Developer
Jun 30, 2016 at 10:34 PM
Could you capture the error message ?
Jul 1, 2016 at 5:26 AM
tinysun:

I do have a couple of printscreen files but don't know how to attach them to this message.

After opening the Swift For Windows application, I selected the source file hello.swift that came with the installation. Next I clicked on the compile button and got an error message in a console window. they are shown below.

Warning: Ignoring invalid option 'LIBPATH:"C:\SwiftForWindows\Swift\lib\swift_static\windows"'
Warning: Ignoring invalid option 'MERGE:.rdata=.rodata'
Warning: Ignoring invalid option 'IGNORE:4006,4049,4217'

These are the compiler settings.
Compiler Settings

VC++ for VS 2015 C:\Program Files (X86)\Microsoft Visual Studio 14.0\VC AMD64
Swift Compiler C:\SwiftForWindows\

If you need more, please let me know. I really would like to learn Swift on the Windows 10 Platform.
Jim Latham
Developer
Jul 5, 2016 at 9:49 AM
Could you run as follows ? It will test compiler in console.
  1. Run in VS2015 x64 Native Tools Command Prompt
  2. cd c:/SwiftForWindows/Swift/bin
  3. copy "c:\SwiftForWindows\My Programs\Hello.swift"
  4. Run: swift Hello.swift
  5. It should print 'Hello World'
  6. Run: swiftc -c Hello.swift -o Hello.obj
  7. Run: link /out:Hello.exe Hello.obj libswiftCore.lib libswiftSwiftOnoneSupport.lib /LIBPATH:"C:/SwiftForWindows/Swift/lib/swift_static/windows" /MERGE:.rdata=.rodata /FORCE:MULTIPLE /IGNORE:4006,4049,4217
  8. It should create the file 'Hello.exe'
  9. Run: Hello.exe
  10. It should print 'Hello World'
Jul 9, 2016 at 1:01 AM
tinysun:
NOTE: I went to the windows 10 start menu and ran the VS2015 x64 Native Tools Command Prompt. When the command prompt window came up, I did the following with the following results.

C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC>cd c:/swiftforwindows/swift/bin

c:\SwiftForWindows\Swift\bin>copy "c:\swiftforwindows\my programs\hello.swift
    1 file(s) copied.
c:\SwiftForWindows\Swift\bin>swift hello.swift
<unknown>:0: error: could not load the swift standard library

NOTE: I continued with your instructions.

c:\SwiftForWindows\Swift\bin>swiftc -c hello.swift -o hello.obj

c:\SwiftForWindows\Swift\bin>link /out:Hello.exe Hello.obj libswiftCore.lib libswiftSwiftOnoneSupport.lib /LIBPATH:"C:/SwiftForWindows/Swift/lib/swift_static/windows" /MERGE:.rdata=.rodata /FORCE:MULTIPLE /IGNORE:4006,4049,4217
Microsoft (R) Incremental Linker Version 14.00.24210.0
Copyright (C) Microsoft Corporation. All rights reserved.

Creating library Hello.lib and object Hello.exp
Hello.exe : warning LNK4088: image being generated due to /FORCE option; image may not run

c:\SwiftForWindows\Swift\bin>hello.exe

NOTE: An error window came up and said that the application was unable to start correctly. Here is a directory list of the current directory.

c:\SwiftForWindows\Swift\bin>dir
Volume in drive C is Bailey
Volume Serial Number is 7EF7-5B96

Directory of c:\SwiftForWindows\Swift\bin

07/08/2016 05:44 PM <DIR> .
07/08/2016 05:44 PM <DIR> ..
02/06/2016 04:16 AM 216,064 cmark.dll
07/08/2016 05:49 PM 2,885,120 Hello.exe
07/08/2016 05:49 PM 36,205 Hello.exp
07/08/2016 05:49 PM 56,962 Hello.lib
07/08/2016 05:43 PM 2,131 hello.obj
04/30/2016 11:28 PM 22 Hello.swift
02/06/2016 07:27 PM 25,048,064 icudt56.dll
02/06/2016 07:27 PM 2,121,728 icuin56.dll
02/06/2016 07:27 PM 1,406,464 icuuc56.dll
04/17/2016 06:44 AM 50,868,224 swift.exe
04/17/2016 06:44 AM 50,868,224 swiftc.exe
          11 File(s)    133,509,208 bytes
           2 Dir(s)  511,119,941,632 bytes free
c:\SwiftForWindows\Swift\bin>
Developer
Jul 9, 2016 at 11:41 AM
Edited Jul 9, 2016 at 11:42 AM
Swift standard library is located at c:\SwiftForWindows\Swift\lib.

Would you check the file list under c:\SwiftForWindows\Swift ?
This is equivalent to the file in https://github.com/tinysun212/swift-windows/releases/tag/swift-msvc-20160418
$ ls -lR
.:
total 17
-rwxrwx---+ 1 SYSTEM SYSTEM 11757 May  8 21:12 LICENSE.txt
-rwxrwx---+ 1 SYSTEM SYSTEM  1046 May  8 21:12 README.txt
-rwxrwx---+ 1 SYSTEM SYSTEM   311 May  8 21:12 Swift.sublime-build
drwxrwx---+ 1 SYSTEM SYSTEM     0 May  8 21:13 bin
drwxrwx---+ 1 SYSTEM SYSTEM     0 May  8 21:13 lib

./bin:
total 127476
-rwxrwx---+ 1 SYSTEM SYSTEM   216064 May  8 21:12 cmark.dll
-rwxrwx---+ 1 SYSTEM SYSTEM 25048064 May  8 21:12 icudt56.dll
-rwxrwx---+ 1 SYSTEM SYSTEM  2121728 May  8 21:12 icuin56.dll
-rwxrwx---+ 1 SYSTEM SYSTEM  1406464 May  8 21:12 icuuc56.dll
-rwxrwx---+ 1 SYSTEM SYSTEM 50868224 May  8 21:12 swift.exe
-rwxrwx---+ 1 SYSTEM SYSTEM 50868224 May  8 21:12 swiftc.exe

./lib:
total 0
drwxrwx---+ 1 SYSTEM SYSTEM 0 May  8 21:13 swift
drwxrwx---+ 1 SYSTEM SYSTEM 0 May  8 21:13 swift_static

./lib/swift:
total 8
drwxrwx---+ 1 SYSTEM SYSTEM 0 May  8 21:13 shims
drwxrwx---+ 1 SYSTEM SYSTEM 0 May  8 21:13 windows

./lib/swift/shims:
total 65
-rwxrwx---+ 1 SYSTEM SYSTEM  3856 May  8 21:12 CoreFoundationShims.h
-rwxrwx---+ 1 SYSTEM SYSTEM  2046 May  8 21:12 FoundationShims.h
-rwxrwx---+ 1 SYSTEM SYSTEM  1411 May  8 21:12 GlobalObjects.h
-rwxrwx---+ 1 SYSTEM SYSTEM  1984 May  8 21:12 HeapObject.h
-rwxrwx---+ 1 SYSTEM SYSTEM  2775 May  8 21:12 LibcShims.h
-rwxrwx---+ 1 SYSTEM SYSTEM 17971 May  8 21:12 RefCount.h
-rwxrwx---+ 1 SYSTEM SYSTEM  2789 May  8 21:12 RuntimeShims.h
-rwxrwx---+ 1 SYSTEM SYSTEM   998 May  8 21:12 RuntimeStubs.h
-rwxrwx---+ 1 SYSTEM SYSTEM   687 May  8 21:12 SwiftStddef.h
-rwxrwx---+ 1 SYSTEM SYSTEM  1964 May  8 21:12 SwiftStdint.h
-rwxrwx---+ 1 SYSTEM SYSTEM  3258 May  8 21:12 UnicodeShims.h
-rwxrwx---+ 1 SYSTEM SYSTEM  1808 May  8 21:12 Visibility.h
-rwxrwx---+ 1 SYSTEM SYSTEM   343 May  8 21:12 module.map

./lib/swift/windows:
total 12024
-rwxrwx---+ 1 SYSTEM SYSTEM 3298816 May  8 21:12 libswiftCore.dll
-rwxrwx---+ 1 SYSTEM SYSTEM 6139570 May  8 21:12 libswiftCore.lib
-rwxrwx---+ 1 SYSTEM SYSTEM  988672 May  8 21:12 libswiftSwiftOnoneSupport.dll
-rwxrwx---+ 1 SYSTEM SYSTEM 1874016 May  8 21:12 libswiftSwiftOnoneSupport.lib
drwxrwx---+ 1 SYSTEM SYSTEM       0 May  8 21:13 x86_64

./lib/swift/windows/x86_64:
total 11393
-rwxrwx---+ 1 SYSTEM SYSTEM 2143212 May  8 21:12 Swift.swiftdoc
-rwxrwx---+ 1 SYSTEM SYSTEM 9320588 May  8 21:12 Swift.swiftmodule
-rwxrwx---+ 1 SYSTEM SYSTEM     564 May  8 21:12 SwiftOnoneSupport.swiftdoc
-rwxrwx---+ 1 SYSTEM SYSTEM  194840 May  8 21:12 SwiftOnoneSupport.swiftmodule

./lib/swift_static:
total 0
drwxrwx---+ 1 SYSTEM SYSTEM 0 May  8 21:13 windows

./lib/swift_static/windows:
total 11100
-rwxrwx---+ 1 SYSTEM SYSTEM 9580332 May  8 21:12 libswiftCore.lib
-rwxrwx---+ 1 SYSTEM SYSTEM 1783918 May  8 21:12 libswiftSwiftOnoneSupport.lib
Jul 10, 2016 at 10:14 PM
tinysun:

My directorys mirror the listing you send. It seems to me that Swift is unable to find the Swift Standard Library.

Jim Latham
Developer
Jul 11, 2016 at 9:51 AM
There is newer version https://github.com/tinysun212/swift-windows/releases/tag/swift-msvc-20160515.
But it is only console version and may not be used together with this GUI.

Can you try it ?
Jul 23, 2016 at 9:21 AM
tinysun:

I tried it but alas, it still had the same message that Swift is unable to find the Swift Standard Library.

I am going to uninstall all of the swift applications (console, etc) and start anew with one items at a time I will start with the swift for windows 1.0 (non-console) and work upward. I will keep you informed.

Jim Latham
P.S. Thanks for your patience.