SingleFileExecutionPlugin icon indicating copy to clipboard operation
SingleFileExecutionPlugin copied to clipboard

Multiple definition of main "Error"

Open imranctg16 opened this issue 7 years ago • 3 comments

I have two .cpp file in my directory ,,and as i would do in codeblock both of them got code in it,,as well as main function,, how do i switch from one file to another and run it ? Single file execution run button is a must need . :(

imranctg16 avatar Jun 05 '17 21:06 imranctg16

If you add executable file by

  1. choose file to execute
  2. right click -> choose "add executable for c/cpp file"
  3. Make sure CMakeLists.txt has modified and sync this change. then can you execute the code from right top button?

corochann avatar Jun 06 '17 04:06 corochann

@imranctg16 after following the previous instructions, if you do not see the executable name in the top right dropdown menu, go to File > Reload CMake Project and then try again.

Btw, @corochann thank you for this plugin. I found it through your comment on SO.

iled avatar Aug 17 '17 04:08 iled

@imranctg16 after following the previous instructions, if you do not see the executable name in the top right dropdown menu, go to File > Reload CMake Project and then try again.

Btw, @corochann thank you for this plugin. I found it through your comment on SO.

I think this works for me.

KylinA1 avatar Oct 02 '18 04:10 KylinA1