[SGVLUG] undefined reference to shared object

Don Saxton dsaxton at pacbell.net
Wed Jan 16 12:13:14 PST 2008


solved. There is a -l (l for library) option on the linker ld. So the 
linker actually does read the interface from the .so and does not need 
headers. My problem was that the library was missing.

Don Saxton wrote:
> I am compiling asterisk with app_rxfax, but at the link stage I get 
> "undefined reference" for functions I know are in libspandsp.so.
>
> I don't know how the linker confirms that the functions, etc are in 
> the library.  Intuitively I think that the /usr/include/spandsp header 
> files define the interface of the library, however that is not buying 
> me much in trying to fix the problem..
>
> Is it true that the linker needs those header files and is not finding 
> them?
> Can I add something to linker options to correct this?
>
> Thanks
>


More information about the SGVLUG mailing list