Binary not found.
When i try to write a simple c++ application using eclipse gallieo i get an error
like g++ -o"Hello1" ./test.o /usr/lib/gcc/i486-linux-gnu/4.3.3/../../../../lib/crt1.o: In function `_start': /build/buildd/glibc-2.9/csu/../sysdeps/i386/elf/start.S:115: undefined reference to `main' collect2: ld returned 1 exit status make: *** [Hello1] Error 1 and when I try to run the same file i get an error as launch failed . I am using ubuntu 9.04. solutions? thank u!! |
Post your code.
|
Quote:
#include <iostream> using namespace std; int main() { cout<<"Hello"<<endl; } |
Quote:
Where is compilation ? And for your simple program one command line is sufficient for both linking and compilation. Why do you use Eclipse in the first place ? |
Try compiling your code as:
Code:
g++ -o "Hello" test.cpp |
All times are GMT -5. The time now is 06:56 PM. |