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]
Other format: [Raw text]

Re: Symbol referencing error


At 09.59 07/02/2002 (GMT +0000), kabir.patel@uk.andersen.com wrote:




>I'm confused.....

Me too :-)


>*pToUpperC is decalred in a header file as:
>
>char *pToUpperC()
>
>and hence looks like a function.

This would mean that pToUpperC takes no arguments, and returns a char *.
So why are you using it like pToUpperC(char *) ?


>But the function body has not been defined
>either in the syb2pv.h or syb2pv.c files.

Then it must be defined in some other file or, probably, in a library.
Link that library (or other file) with your file.

>I changed the above to:
>
>char *pToUpperC(char *)
>
>since pNote is declared as:
>
>char *pNote

I actually don't think this is very usefull - if pToUpperC is defined as to 
take no arguments, redeclaring it won't do you any good.

>I also, declared *pToUpperC in my syb2pv.c file, but still get the error
>message.

The error message (a LINKER error) means the function is declared, but not 
defined.
So you must provide (link it, wirte it, whatever) the function body.

>Was this what  I was meant to do?

Don't think so.
You should find the documentation for pToUpperC. That should include the 
right prototype (declaration), as well as telling how to use it (what 
library to link against, etc..)

>Thanks

HTH
fwyzard


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