How to link external library

Alvin Beach abeach at deepvision.ca
Mon Mar 7 23:15:30 GMT 2005


On March 7, 2005 05:01 pm, Petr Hlozek wrote:
> Hello,
>
> I'm new to C++ and KDevelop. I tried simple C++ program with external
> library. This is part of source code:
>
> #include <iostream>
> #include <hamlib/rigclass.h>
> #include <hamlib/rig.h>
>
>
> using namespace std;
>
> int main(int argc, char *argv[])
> {
> 	Rig myRig = Rig(RIG_MODEL_DUMMY);
>
> 	try {
> 		myRig.open();
>
> The problem is that compiler doesn't find declaration of class Rig. This
> declaration is in rigclass.h. This file is in /usr/include/hamlib.
> Could you help me how to make "visible" declaration of Rig for compiler?
> I spend with this long time without succes.
>
> Thanks very much.
>
> Petr
>
> P.S. Sorry for my poor English

You need to specify the hamlib library in the Automanager. Open the Automake 
manager on the right. Right click on the binary and select Options. In the 
Libraries tab add -l<name of hamlib library> (e.g. -lhamlib).

-- 
Please reply to the list only.

-
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