tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] library search path


From: Vittorio Giovara
Subject: Re: [Tinycc-devel] library search path
Date: Mon, 9 Sep 2013 16:32:48 +0200

On Mon, Sep 9, 2013 at 3:47 PM, Thomas Preud'homme <address@hidden> wrote:
> Le lundi 9 septembre 2013 15:20:52 Vittorio Giovara a écrit :
>> Hello,
>> I'm trying to use tcc to compile my application but I get linking
>> errors because of conflicting directories.
>> In my current setup I have the main source file in the source root and
>> then a few libraries inside subfolders.
>> At link time I pass -Lsubfolder -lthelib as first arguments.
>> Everything goes smooth if I run this in a clean install.
>> However if I have libthelib.a in one of the default search path (eg in
>> /usr/local/lib) the local one will not be picked, and instead the one
>> present in the default search path will be linked.
>> I fear that tcc is not respecting the user library search order, but I
>> found no flags that allow modifying it.
>
> Indeed. Tcc add directories to search for libraries at the end of the existing
> list. Since there is only one global list, they are searched after the default
> directories. What should be done is to separate search path between default
> and non default like is done for includes. Search path need to be added in
> order (think -Ldir1 -Ldir2) but user provided path should be searched first.
>
> This should be an easy patch so if somebody is looking for a way to contribute
> to tcc that's a good way to start.

Is something like this acceptable?

Thanks,
Vittorio

>
>> Can anyone help me in this problem?
>> Thank you,
>> Vittorio
>
> Best regards,
>
> Thomas

Attachment: 0001-set-the-user-defined-library-search-paths-before-the.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]