jinxjinx
June 28th, 2006, 03:10 AM
im using the c++ plug in for eclipse and im tyring to compile and run my hello world program and i get this:
**** Full rebuild of configuration Debug for project test ****
make -k clean all
rm -rf ./testmain.d ./testmain.o test
Building file: ../testmain.cpp
Invoking: GCC C++ Compiler
gcc -O0 -g3 -Wall -c -fmessage-length=0 -otestmain.o ../testmain.cpp
Finished building: ../testmain.cpp
Building target: test
Invoking: GCC C++ Linker
gcc -otest ./testmain.o
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../lib/crt1.o: In function `_start':../sysdeps/i386/elf/start.S:115: undefined reference to `main'
collect2: ld returned 1 exit status
make: *** [test] Error 1
make: Target `all' not remade because of errors.
Build complete for project test
my hello world program is here:
#include <iostream>
using namespace std;
void main()
{
cout << "Hello World";
}
any help would be great thanks!
**** Full rebuild of configuration Debug for project test ****
make -k clean all
rm -rf ./testmain.d ./testmain.o test
Building file: ../testmain.cpp
Invoking: GCC C++ Compiler
gcc -O0 -g3 -Wall -c -fmessage-length=0 -otestmain.o ../testmain.cpp
Finished building: ../testmain.cpp
Building target: test
Invoking: GCC C++ Linker
gcc -otest ./testmain.o
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../lib/crt1.o: In function `_start':../sysdeps/i386/elf/start.S:115: undefined reference to `main'
collect2: ld returned 1 exit status
make: *** [test] Error 1
make: Target `all' not remade because of errors.
Build complete for project test
my hello world program is here:
#include <iostream>
using namespace std;
void main()
{
cout << "Hello World";
}
any help would be great thanks!