This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

how to comilate cpp with object file


Hi,
I dont understand why i could copilate with c and not with c++ file, when 
do:

gcc -o myprog test.c myobjfile.o -lm 

I could copilate but when i do same in c++ mode it din t work 

gcc -o myprog test.cpp myobjfile.o -lm 

I got a error undefined reference to `myfunc(char *)'

someone could explaie why it din t work!!!


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]