Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » eclipse creates exe for C++ not for C project
icon5.gif  eclipse creates exe for C++ not for C project [message #1007891] Fri, 08 February 2013 00:51
Missing name Mising name is currently offline Missing name Mising nameFriend
Messages: 7
Registered: April 2011
Location: USA
Junior Member
I just installed juno eclipse and Mingw and created a C++ project. That worked fine and ran like it should. But when I tried to create a C project, eclipse looks like it works, but looking in the directory, there is no executable. I was wondering if anyone else has had this problem and knows how to fix it.

Oh, one other thing I noticed is that the C++ project creates a Binaries folder under its project root while there is no such folder in the C project root.
(I have attached an image of the project explorer).

The code is the standard hello world template for both projects.



16:31:02 **** Rebuild of configuration Debug for project Test ****
Info: Internal Builder is used for build
g++ -O0 -g3 -Wall -c -fmessage-length=0 -o "src\\Test.o" "..\\src\\Test.cpp"
g++ -o Test.exe "src\\Test.o"

16:31:03 Build Finished (took 890ms)


16:32:08 **** Rebuild of configuration Debug for project Test2 ****
Info: Internal Builder is used for build
gcc -O0 -g3 -Wall -c -fmessage-length=0 -o "src\\Test2.o" "..\\src\\Test2.c"
gcc -o Test2.exe "src\\Test2.o"

16:32:09 Build Finished (took 1s.119ms)

Oh, I discovered another thing. If I create a C++ project hello world it will compile fine, but if I then replace the C++ code with straight C code as in:

#include <iostream>
using namespace std;

int main() {
	cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!!
	return 0;


#include <stdio.h>
#include <stdlib.h>

int main(void) {
	puts("!!!Hello World!!!"); /* prints !!!Hello World!!! */

So, I have a Test3.cpp file with C code and it does not compile to an executable either.

[Updated on: Fri, 08 February 2013 01:12]

Report message to a moderator

Previous Topic:No error when class not #included?
Next Topic:How do I create an OS-neutral run configuration in Eclipse?
Goto Forum:

Current Time: Fri Jun 22 15:41:16 GMT 2018

Powered by FUDForum. Page generated in 0.02181 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top