Where do the linker look for shared libraries?

Andreas Davour ante at Update.UU.SE
Wed Mar 2 12:00:27 PST 2005


On Wed, 2 Mar 2005, Dan Nelson wrote:

> In the last episode (Mar 02), Andreas Davour said:
>> I've tried to compile and link a small game written with the Allegro
>> API. For some odd reason the linker just don't understand how to
>> resolve the symbols in the library. It just can't accept that the
>> library is in a ".so" file and not an ".a" archive, and even when I
>> point it out explicitly it still don't get it.
>>
>> This is my commandline:
>>
>> gcc main.o rotoAction.o rotoCog.o -o RotoCube.exe -lstdc++ -L/usr/local/lib/ -lalleg
>>
>> and the errors I get looks like this:
>>
>> /usr/local/lib//liballeg.so: undefined reference to `_poly_zbuf_atex_trans8'
>> /usr/local/lib//liballeg.so: undefined reference to `_poly_scanline_atex_mask_lit32'
>
> This is the linker saying "there are symbols in liballeg.so that I
> cannot find anywhere".  Maybe you need to specify another library along
> with liballeg?  Are you using the allegro port?

I have grep'ed for those symbols and they come from liballeg.so, no 
place else. That's one of the very confusing things with those errors.

I'm using the allegro port. BTW, there is a linux-allegro port as well. 
Why is this needed if Allegro is a platform independant API?

/Andreas

-- 
A: Because it fouls the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?


More information about the freebsd-questions mailing list