首页 > 解决方案 > Clion: Error running 'makefile': Cannot build 'makefile'

问题描述

I have not seen any thread talk about this specific error so here is the problem:

I have set up a C project in Clion and I configured in Setting -> Build,Execution,Deployment -> Toolchains a file usr/bin/make as the Make.

I could run my code yesterday but today, i get the warning in a red window popping-up: Error running 'makefile': Cannot build 'makefile' when I try to run my code.

What could possibly cause this?

标签: cclion

解决方案


It seems like you’re trying to run the makefile instead of the program that is built by it. Have you tried doing a build first? Or maybe you should try to clean the project too. Have a look a the blog post of JetBrains https://blog.jetbrains.com/clion/2020/06/makefile-projects-in-clion/. There’s a gif that shows how to clean the project. Hope this helps, if not maybe post your makefile so we can check if it has any errors.


推荐阅读