Swift does not not Build
Hi,
I just downloaded CLion 2017 and updated Swift Plugin....Swift toolchain is properly found, but when I try to run the the project, there's not executable. I've tried to build the project manually (Command+F9), but it does not build anything... : The .build directory is not created....
If I compile with terminal (swift build), I cannot select the .build directory where is located the executable because it is hidden by the file selector dialog).
How can I make it work ?
David
Please sign in to leave a comment.
Anybody here to help fixing this issue ?
David
Hey,
I had a similar issue that's how I found your post here and I think I have solved it. Here is what I did:
Since you said that the toolchain is properly set up, I won't go into details on that.
As for me, CLion was giving me the same error as yours, namely that the specified executable path is not found. So I went to Run->Edit Configurations and then adjusted the Executable path. I think that you have tried to look up the executable path and found nothing, that was for me the case too initially. BUT: When you open the "Select Path" Dialog in order to find the path of the executable, you have to enable "Show Hidden Files and Directories" (it is one of the symbols at the top of the dialog), then you will see that in your working directory there is a .build/debug/ folder. In this folder your executable is located. Just select it and press "Ok" and you are done.
In case that you don't see these hidden folders and the executable respectively, you may have to go to Run -> Build and thus build the executable before you add it.
I hope that helps!
Best regards