I've opened a bug regarding this <a href="http://bugs.freepascal.org/view.php?id=23948">http://bugs.freepascal.org/view.php?id=23948</a> for better tracking this issue.<br>Thanks for all the feedback received here.<br>
Vittorio<br><br><div class="gmail_quote">On Sat, Feb 23, 2013 at 5:50 PM, Vittorio Giovara <span dir="ltr"><<a href="mailto:vittorio.giovara@gmail.com" target="_blank">vittorio.giovara@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 22/feb/2013, at 16:59, Tomas Hajny <<a href="mailto:XHajT03@hajny.biz">XHajT03@hajny.biz</a>> wrote:<br>
<br>
> On Fri, February 22, 2013 16:33, Vittorio Giovara wrote:<br>
><br>
><br>
> Hi,<br>
><br>
>> yes I was talking about linux. I didn't include much information because I<br>
>> didn't want to confuse people with details.<br>
>><br>
>> In this branch of Hedgewars<br>
>> <a href="https://code.google.com/p/hedgewars/source/list?name=physfslayer" target="_blank">https://code.google.com/p/hedgewars/source/list?name=physfslayer</a> we are<br>
>> using physfs library version 2.1.0.<br>
>> However many people out there have version 2.0.3 installed and (of course)<br>
>> it doesn't contain many of the APIs present in 2.1.0.<br>
>> So when libphysfs is not found (or an old one is detected) we provide a<br>
>> copy of the right physfs and have CMake (our build system) compile and<br>
>> install it. However even if I hardcode the right path of the right library<br>
>> of the right version, the installed system library takes precedence, and<br>
>> thus if another version of physfs is installed, hedgewars doesn't link any<br>
>> more.<br>
>><br>
>> I would refrain from using a different library name; looking at the<br>
>> generated link.res file it seems that the first lib search path is<br>
>> /urs/lib<br>
>> and /lib and the custom one (where the right libphysfs resides) is found<br>
>> only later on. Is there a way to prevent this? I tried to play with the<br>
>> -Xd<br>
>> flag but the result didn't change.<br>
><br>
> I don't know enough about the library path setting (I leave commenting on<br>
> this to others). However, if you require a specific version number of a<br>
> library (and even distribute that version with your code), explicitly<br>
> linking to that library version seems to be the appropriate solution from<br>
> my point of view. Another option may be linking the respective library<br>
><br>
<br>
</div></div>As mentioned, I've been doing only static builds so far. Plus I passed<br>
the linker (with -k) the full path of the library it should link, but<br>
the system one is somehow always dragged in and linked before my<br>
command takes effect.<br>
<span class="HOEnZb"><font color="#888888"><br>
Vittorio<br>
</font></span></blockquote></div><br>