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

_______________________________________________
http://lists.gnu.org/mailman/listinfo/libtool

Reply via email to