Re: Extend the agent with a c file using a shared library

2007-07-13 Thread BAUDRY Charles
To close the subject, if that can help the users, there is another way to use a shared library for an agent extension and it works well for me. It is possible to use the dlfcn.h interface, described on this website: http://www.informit.com/guides/content.asp?g=cplusplus&seqNum=153&rl=1 Thanks to t

Re: Extend the agent with a c file using a shared library

2007-07-12 Thread Thomas Anders
BAUDRY Charles wrote: > /usr/bin/ld: fsprpc_clnt.a(fsprpc_c.o): Relocations in generic ELF (EM: 20) > fsprpc_clnt.a: could not read symbols: File in wrong format > collect2: ld returned 1 exit status > make: *** [snmpd] Error 1 We don't know anything about your fsprpc_clnt.a and/or your platform,

Re: Extend the agent with a c file using a shared library

2007-07-12 Thread BAUDRY Charles
Hello I tried to add my library with the options --with-ldflags=-L/path/to/dir --with-libs=fsprpc_clnt.a It didn't work and the make step failed, it says that it doesn't find the file. As said in the previous message, the ./configure find the file but not the make... I searched in the mailing lis

Re: Extend the agent with a c file using a shared library

2007-07-11 Thread Thomas Anders
Thomas Anders wrote: > If the library isn't in a standard location, add > --with-ldflags=/path/to/dir . Oops, rather: --with-ldflags=-L/path/to/dir +Thomas -- Thomas Anders (thomas.anders at blue-cable.de) - This SF.net e

Re: Extend the agent with a c file using a shared library

2007-07-11 Thread Thomas Anders
BAUDRY Charles wrote: > I saw on this link > http://sourceforge.net/mailarchive/message.php?msg_id=sdk5vr6yud.fsf%40wes.hardakers.net > > that we can not use shared library... So I tried with a static library

Re: Extend the agent with a c file using a shared library

2007-07-11 Thread BAUDRY Charles
Hello Thomas, thanks for your answer. I saw on this link http://sourceforge.net/mailarchive/message.php?msg_id=sdk5vr6yud.fsf%40wes.hardakers.net that we can not use shared library... So I tried with a static library your option --with-libs="-llibrary" but it doesn't find the file and stop the con

Re: Extend the agent with a c file using a shared library

2007-07-11 Thread Thomas Anders
BAUDRY Charles wrote: > I'm using Net-SNMP 5.1.9 on a PowerPC system. I would like to extend the > agent with a C file which uses some functions included in a shared > library. The thing is I don't know how to compile Net-SNMP including > this library. > I tried with --enable-shared="library.so" bu

Extend the agent with a c file using a shared library

2007-07-11 Thread BAUDRY Charles
Hello, I'm using Net-SNMP 5.1.9 on a PowerPC system. I would like to extend the agent with a C file which uses some functions included in a shared library. The thing is I don't know how to compile Net-SNMP including this library. I tried with --enable-shared="library.so" but it doesn't appear to