SingleFileExecutionPlugin icon indicating copy to clipboard operation
SingleFileExecutionPlugin copied to clipboard

Fail to access the file

Open doctormin opened this issue 6 years ago • 5 comments

I created a .cpp on my desk, and edit it with CLion, then I right clicked the eidtor and chose "add executable for..." then the alarming "Fail to access the file" merged in the CLion event log.

doctormin avatar Sep 28 '19 16:09 doctormin

same

Jess713 avatar Oct 01 '19 21:10 Jess713

Do you have CMakeLists.txt in project root directory?

corochann avatar Oct 02 '19 02:10 corochann

No,

I didn’t open any projects

I just right click on a .cpp file (in windows 10) on my desktop and chose “open it with CLion”

And CLion is opened with just the .cpp file(nothing else) in the root directory.

I know that CLion must work with a CMakeList.txt

But codeblocks can run and edit one .cpp file without any other files in the directory.

I think that is very useful for students like me 😊

For example, my classmate sometimes send me a single C++ file to let me check the correctness of his/her algorithm. At this time, I don't want to create a new project, but just want to run CLion as a compiler.

发件人: corochann 发送时间: 2019年10月2日 10:50 收件人: corochann/SingleFileExecutionPlugin 抄送: YM ZHAO; Author 主题: Re: [corochann/SingleFileExecutionPlugin] Fail to access the file(#8)

Do you have CMakeList.txt in project root directory? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

doctormin avatar Oct 05 '19 05:10 doctormin

I see. Current software design always requires CMakeList.txt exist in the project. Because CLion IDE functionality (completion etc) only work when cMakeList.txt is correctly set.

So this kind of project structure is necessary.

How about creating one (big) project like "one-file-execution-project" from CLion (which initializes the project with CMakeLists.txt and always copy and paste your new one cpp file under this project?

corochann avatar Oct 07 '19 00:10 corochann

Yeah, I just did it like you said,

Indeed, creating a big project is very helpful

In this way, your C/C++ Single File Exectution plugin can help me a lot

Thank you very much for developing such a useful plugin anyway !

发件人: corochann 发送时间: 2019年10月7日 8:39 收件人: corochann/SingleFileExecutionPlugin 抄送: YM ZHAO; Author 主题: Re: [corochann/SingleFileExecutionPlugin] Fail to access the file(#8)

I see. Current software design always requires CMakeList.txt exist in the project. Because CLion IDE functionality (completion etc) only work when cMakeList.txt is correctly set. So this kind of project structure is necessary.

How about creating one (big) project like "one-file-execution-project" from CLion (which initializes the project with CMakeLists.txt and always copy and paste your new one cpp file under this project? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

doctormin avatar Oct 07 '19 00:10 doctormin