Oh no, Not another Undefined Reference Question!

Posted by roony on Stack Overflow See other posts from Stack Overflow or by roony
Published on 2010-05-12T14:09:22Z Indexed on 2010/05/12 14:24 UTC
Read the original article Hit count: 173

Filed under:
|
|
|
|

Unfortunately yes.

I have my shared library compiled, the linker doesn't complain about not finding it but still I get undefined reference error. Thinking that I might be doing something wrong I did a little research and found this nice, simple walkthrough:

http://www.adp-gmbh.ch/cpp/gcc/create_lib.html

which I've followed to the letter but still I get:

$ gcc -Wall main.c -o dynamically_linked  -L.\ -lmean
/tmp/ccZjkkkl.o: In function `main':
main.c:(.text+0x42): undefined reference to `mean'
collect2: ld returned 1 exit status

This is pretty simple stuff so what's going wrong?!?!? Can anyone suggest something in my set up that might need checking/tweeking?

GCC 4.3.2 Fedora 10 64-bit

© Stack Overflow or respective owner

Related posts about gcc

Related posts about c