What does this error mean?
/tmp/ccevEqoI.o: In function `main':
funcptr.c:(.text+0x61): undefined reference to `AddALL'
collect2: ld returned 1 exit status
I'm trying to write a function which adds all the integers up to the limit entered by the user.
Transcribed 'answer' which is a comment from the OP:
I wrote a program that would add all the integers upto the limit Specified. For that I had to write a function. So I made a function called 'AddAll' but when I called it from my program I called it as 'AddALL'.
Note: C is case sensitive. Eventually when I changed the name of the function where I was calling it. It compiled perfectly :)
Just thought that this piece of info would be useful to beginners.
It means that the linker (that is called ld
in gcc) did not found the symbol AddALL
in the specified object files. Basically, there is no body for that function or it's a variable declared as extern
with no definition.
It tells you that the definition for the function 'AddALL' could not be found. Make sure that you include the object file that contains 'AddALL' when you compile/link.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With