How to link external library

Tarjei Knapstad tarjei.knapstad at predichem.com
Thu Mar 10 11:38:15 GMT 2005


On Tue, 2005-03-08 at 13:20, Petr Hlozek wrote:

> g++ -O0 -g3 -o hamradio hamradio.o /usr/lib/libhamlib.so -ldl -lm

This is not correct, you cannot link a dynamic library like that.

/usr/lib/libhamlib.so should be -lhamlib (the compiler looks in /usr/lib
for libraries by default so you won't need to include a specific link
path).

As Alvin said, in the automake manager find your binary, then right
click and select Options. Click the "Libraries" tab, and in the "Link
libraries outside project (LDADD)" section, click Add. Type in -lhamlib
and try again. If you're calling a C++ wrapper (and you seem to be) you
will probably also have to add a -lhamlib++ entry like Andreas said.

--
Tarjei




-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«



More information about the KDevelop mailing list