corochann / SingleFileExecutionPlugin

Single File Execution Plugin is a plugin for CLion (C/C++ IDE on IntelliJ platform provided by Jetbrain).
MIT License
83 stars 14 forks source link

Fail to access the file #8

Open doctormin opened 5 years ago

doctormin commented 5 years ago

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.

Jess713 commented 5 years ago

same

corochann commented 5 years ago

Do you have CMakeLists.txt in project root directory?

doctormin commented 5 years ago

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.

corochann commented 5 years ago

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?

doctormin commented 5 years ago

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.