[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Libtool is looking for main() when linking shared library
From: |
Peter Rosin |
Subject: |
Re: Libtool is looking for main() when linking shared library |
Date: |
Mon, 21 Mar 2011 14:18:55 +0100 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 |
Den 2011-03-21 12:34 skrev Satz Klauer:
> On 3/21/11, Peter Rosin wrote:
>> So,
>>
>> libtool --mode=compile g++ -o libmylib.lo libmylib.cpp
>> libtool --mode=link g++ -o ../libmylib.la libmylib.lo -pthread -ldl
>> -export-symbols-regex mylib_ -rpath /usr/local/lib
>>
>> might work better (untested)
>
> That works a bit better - so at least I get a shared library now.
Now I have tested my suggestion, and I had forgotten the -c in the
compile step...
> Unfortunately the -export-symbols-regex seem not to work, it still
> exports all symbols, not only the ones that start with/contain
> "mylib_".
...but after adding that it works for me to limit symbol visibility with
the above. So, it might be that libtool does not support limiting symbol
visibility on your system? I couldn't tell, and am probably not the
right person to further debug this.
So, please post further details on your OS etc. See section 2 in
http://git.savannah.gnu.org/cgit/libtool.git/tree/README
Cheers,
Peter