Hello World running in CLion, but clicking exe file in windows navigator gives error
Answered
I am running cygwin and have likely forgotten to configure something. Anyway, I have a simple Hello World program. I can build it and execute it within Clion console with no problem. However, I cannot seem to run the actual .exe file. When I click on it, I get 'the application was unable to start correctly (0xc000007b)' error message.
Please sign in to leave a comment.
Hi Evan.
In general, Cygwin can't produce stand-alone binaries, it requires cygwin1.dll to be present in the path. CLion provides it in the path when it launches an executable. It might be the reason in your case.
You can also modify CMakeList's CMAKE_EXE_LINKER_FLAGS to instruct your executable to be linked statically. It'll exponentially increase the size of the .exe, though, and isn't really a good idea unless you absolutely positively need to contain your application to a single file.