RE: Simple linking problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi gccNewbie,

>So it is really a very simple riddle. 'gcc -lmylib mysource.c' uses a function 'foo' which nm shows is defined in libmylib.a. gcc does not complain about not being able to find mylib, but it does complain that 'foo' is an 'undefined reference'. In what situation could that happen?

Dependency order is important.

What happens when you do:

gcc mysource.c -lmylib

HTH,
--Eljay


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux