undefined reference to `foo()'
Gengis Kanhg Toledo RamÃrez
gengiskanhg.geo@yahoo.com
Mon Dec 11 18:38:00 GMT 2006
$ more *.cc *.h
::::::::::::::
foo.cc
::::::::::::::
#include "foo.h"
int foo()
{
return 42;
}
::::::::::::::
main.cc
::::::::::::::
#include "foo.h"
int main()
{
return foo();
}
::::::::::::::
foo.h
::::::::::::::
int foo();
$ g ./main.cc -o prueba
/home/<myname>/tmp/ccEOfejM.o(.text 0x11): In function
`main':
: undefined reference to `foo()'
collect2: ld returned 1 exit status
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com
More information about the Gcc-help
mailing list