I have two small .cpp files that I compile to an
.o file like this:
g++ -c scantest.cpp
g++ -c scanini.cpp
These file seem to compile ok.
I then take them and compile them together
like this:
g++ -o scantest.o scanini.o -i686 -L/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.2.3 -lgcc -lc -lgcc -o scantest
I now get the error
/usr/lib/crt1.o: In function `_start':
/usr/lib/crt1.o(.text+0x18): undefined reference to `main'
collect2: ld returned 1 exit status
Any ideas?
thanks inadvance