Clion (Visual Studio): C compiler is not able to compile a simple test program.

Answered

0
6 comments

Hello!

Please try doing the following:

  1. Create temp folder in location which path doesn't include non-latin symbols (for example, C:\tmp).
  2. In CLion menu select Help | Edit Custom VM options....
  3. In the opened file add this line: -Djava.io.tmpdir=<path_to_temp_folder> (for example, -Djava.io.tmpdir=C:/tmp).
  4. In the menu do File | Save All.
  5. Restart CLion.
-1
Avatar
Permanently deleted user

Thanks, that really helped (actually it removed the yellow triangle under compilers). But Clion still does not want to compile... 

Maybe it`s because of the path in project. The path contains non-english letters. I assume that`s where the problem lies...

0

Yes, please move the CMake generation directory to a path that doesn't contain such characters either via `File | Settings | Build, Execution, Deployment | CMake | Generation path`, or just put the project itself to other location (in this case please close the project beforehand).

0
Avatar
Permanently deleted user

Well, now I have no no-english characters in the path
But it still crashes... 


Maybe I need to install some other components in MS Installer
If so, does anybody know which one?

 

0

I assume you get "RC Pass 1: command "rc <...>" failed (exit code 0) with the following output: The system cannot find the file specified".

Please see this thread, for example - https://gitlab.kitware.com/cmake/cmake/-/issues/19054:

Be sure to run in an environment in which where rc and where mt both find the tools. In the VS 2015 installer be sure relevant components are selected for Windows Desktop development with C++.

In other words, you need to have rc.exe and mt.exe installed and the paths to them added to your system path (Control Panel ⇒ (Optional) System and Security ⇒ System ⇒ Advanced System Settings ⇒ Advanced tab ⇒ Environment Variables ⇒ System Variables ⇒ Select variable named "PATH" ⇒ Edit ⇒ Add the necessary path to the existing PATH entry).

In my case rc.exe and mt.exe are located in subfolders of C:\Program Files (x86)\Windows Kits.

 

0
Avatar
Permanently deleted user

Thanks, I've solved it.
It has needed installing some another packages from Visual Studio Installer.
After that Clion will determine all the files it needs for correct work of Cmake.

0

Please sign in to leave a comment.