Hi guys,
I've got a strange error coming up.......
Particularly,
[Warning] In function 'main'
[Link error] undefined reference to 'show_menu'
What does the above error mean?
I've been trying to fix it but with no such luck....
Hi guys,
I've got a strange error coming up.......
Particularly,
[Warning] In function 'main'
[Link error] undefined reference to 'show_menu'
What does the above error mean?
I've been trying to fix it but with no such luck....
This means that you've try to use a function called show_menu, but the source for that function is not available to the linker. Did you spell it correctly (including case)?
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]
Spelling is good, as weel as the inclusion of the case.
How do I check if its included in the linker? Which part are we talking about here?
If the source is in another file, you need to link differently:
>>cc file1.c file2.c
There are examples of using multiple source files in these forums, try a search if you want to see an example.
Post an example of the basic structure of your files if you get stuck, and someone will help you.
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]
But, the only problem is i'm not using another file...
I'm not linking this to another file..
What other reason could it possibly be?
Your function is not defined, maybe you just inserted the prototype, but the function it'self you didn't create.