<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/1.1.10">
May be you are familiar with the way linux use the shared libraries. you may have one or both of the following, a shared object .so or an object library, .la. <BR>
Linux names libraries using the "lib" word + "library name" + ".so", (asume the library is in a standard location, /lib/, /usr/lib, etc...)<BR>
Supouse U want to with pthread library, the library name is libpthread.so, ok, then Project Menu->Project Options (F7) -> Compiler Options -> Linker Flags, Add this:<BR>
"-l" + "library name"<BR>
with no lib or .so.xxx<BR>
hope It help... best <A HREF="mailto:reg@rds">reg@rds</A> <BR>
On Tue, 2003-09-16 at 15:13, Friedrich Koester wrote:
<PRE><FONT COLOR="#737373" SIZE="3"><I>Hi there!
I know that this is probably a newbie question; but I've been looking for a
solution for several hours now and can't find anything useful.
I want to program in C using KDevelop 2.1.5 using KDE 3.1.1 under SuSE Linux
8.2. I want to include an external library from Sourceforge (net-snmp). I
installed it GNU-like, and the .h-files reside in
/usr/local/include/net-snmp/ now. As a starting point I've tried to implement
an example program from a tutorial which can be found here:</FONT>
<A HREF="http://www.net-snmp.org/tutorial-5/toolkit/demoapp/index.html"><FONT SIZE="3">http://www.net-snmp.org/tutorial-5/toolkit/demoapp/index.html</FONT></A>
<FONT COLOR="#737373" SIZE="3">
I've successfully compiled and run that program using the Makefile provided on
that page. But in KDevelop, I seem to have problems linking to the libraries
which are included in the beginning of the file:
The function calls referring to those libraries produce errors during 'make'
main.o(.text+0x26): In function `main':
/home/[bla]/main.c:56: undefined reference to `init_snmp'
main.o(.text+0x38):/home/[bla]/main.c:61: undefined reference to
main.o(.text+0x7f):/home/[bla]/main.c:75: undefined reference to `snmp_open'
main.o(.text+0x9e):/home/[bla]/main.c:79: undefined reference to `snmp_perror'
and so on...
I've tried including those libraries by choosing Project -> Options -> Linker
Options -> additional libraries. I'm not sure about the format in which I'd
have to enter the reference to the libraries, though, and couldn't find any
information on that either.
My question is: where and in what format do I need to tell KDevelop about
those external libraries?
Thank you for any help
to unsubscribe from this list send an email to email@example.com with the following body:
<PRE><TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
Israel Fdez Cabrera<BR>
Usuario Linux: 270292 (<A HREF="http://counter.li.org">http://counter.li.org</A>)<BR>
Segurmatica. Consultoría y Seguridad Informática<BR>
La Habana, Cuba.