Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CLion: Swift - "Executable is not specified"

I'm trying to play around with server-side Swift on MacOS High Sierra using CLion as my IDE. I have installed the Swift plugin, along with the Swift development toolchain. I can create a Swift project successfully, but when I go to "Run" to execute the program, I see an error message saying, "Error: Executable is not specified". The Executable pull-down menu doesn't list anything. It just says, "Select other..."

I haven't touched any of the files created when I created the Swift project. Is there something else I need to do to get this executable to run? My Build appears to go fine, but I still don't see the Executable pull-down menu populated.

like image 314
Shadowman Avatar asked Oct 28 '25 06:10

Shadowman


1 Answers

i've did a simple hack that worked for me my OS is like yours {Mac os 10.13.1 } i'm using clion 2017.2.3

1- build your project like normal, if it was built right the executable with what ever name you gave it will be at directory /project/.build/debug/executable

2- the .build directory is hidden so you need to unhide it (the . at the start of directory or file name is forbidden so you can't unhide it), i've created an alias and change it's name to {some name with no . before it}

3- know go to clion->edit configuration->Executable->select other. know go to the alias folder that you've created and choose the executable at /project/newbuild/debug/executable

like image 129
yazan daba Avatar answered Oct 29 '25 22:10

yazan daba