This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Symbol referencing error
- From: Andrea 'Fyre Wyzard' Bocci <fwyzard at inwind dot it>
- To: kabir dot patel at uk dot andersen dot com
- Cc: me at rupey dot net,gcc-help at gcc dot gnu dot org
- Date: Thu, 07 Feb 2002 12:13:01 +0100
- Subject: 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