libtool
[Top][All Lists]
Advanced

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

Libtool is looking for main() when linking shared library


From: Satz Klauer
Subject: Libtool is looking for main() when linking shared library
Date: Mon, 21 Mar 2011 07:36:50 +0100

Hi,

I try to use libtool to limit the number of symbols exported by a
shared library. My previous call to create this library looked like
this and worked fine:

g++ -shared   -o ../libmylib.so libmylib.o -pthread -ldl

Now I modified it so that my resulting libmylib.so only exports
symbols that start with mylib_ :

libtool --mode=link g++ -shared   -o ../libmylib.so libmylib.o
-pthread -ldl -export-symbols-regex mylib_

But despite the keyword "shared" now libtool complains about a missing
function main(), means it tries to create an executable program
instead of a shared library.

What am I doing wrong here?

Elmi



reply via email to

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