0

i have Eclipse Juno installed along with the c/c++ plugin and MinGW(works fine in shell command line) but whenever i try to run my C app it fails with this message below:

Error starting process.
Cannot run program "C:\Users\jonney\Work\HelloWorldC\hello.c": Launching failed
Cannot run program "C:\Users\jonney\Work\HelloWorldC\hello.c": Launching failed
Cannot run program "C:\Users\jonney\Work\HelloWorldC\hello.c": Launching failed

here is my C code

#include <stdio.h>

int main() {
   printf("Hello, world!\n");
   return 0;
}

It is just a simple Hello world using hello.c file that contains the code above.

When i first ran it, my anti virus notified me as this C app a potential threat along with the error from eclipse. I disabled the anti virus and still get the error.

any advice?

i am using windows 7 if that helps

Jono
  • 17,341
  • 48
  • 135
  • 217
  • Make sure you follow all steps here: http://stackoverflow.com/questions/12165746/how-to-install-c-plugin-to-eclipse/12169583#12169583 – Sudhee May 14 '13 at 09:53

1 Answers1

0

It seems that you are trying to run a .c file. Not a program. You need to compile it.

I'm not a pro using eclipse but I think the mistake could be there.

Maybe this could help : http://www.codeproject.com/Articles/14222/C-Development-using-eclipse-IDE-Starters-guide

This could help too (a bit old) : http://www.ibm.com/developerworks/opensource/library/os-ecc/?S_TACT=105AGX44&S_CMP=ART

Pierre Fourgeaud
  • 14,290
  • 1
  • 38
  • 62