On Tue, Jul 12, 2005 at 06:33:20PM -0400, Deepak Arya wrote:
> Magnus,
> 
> thanks for your reply. here is my lib include and when i made few INLINE 
> function to non-inline i didn't get the link error for those function. 
> "-lda" and "-ldeas" are my library files, which i am including.
> 
> 
> /bin/sh ../libtool --mode=link g++ -g -O2 -Dlinux -Wall -o snmpd snmpd.lo 
> libnetsnmpmibs.la <http://libnetsnmpmibs.la>
> libnetsnmpagent.la<http://libnetsnmpagent.la>helpers/libnetsnmphelpers.la
> ../snmplib/libnetsnmp.la -ldl -lcrypto -lelf
> -lm -lda -ldeas helpers/libnetsnmphelpers.la 
> g++ -g -O2 -Dlinux -Wall -o .libs/snmpd snmpd.o ./.libs/libnetsnmpmibs.so 
> -L/home/darya/ow/src/ui/lib ./.libs/libnetsnmpagent.so 

net-snmp-config --netsnmp-agent-libs results in
-lnetsnmpagent -lnetsnmpmibs -lnetsnmphelpers -lnetsnmp.

If you try to add exactly those libraries in exactly that order, does that
improve the situation for you?

The reason for the order dependencies are that the libraries are using each
other.

If this doesn't help, does it work if you link with the static versions of
the net-snmp libraries?

> ../snmplib/.libs/libnetsnmp.so -ldl -lcrypto -lelf -lm -lda -ldeas 
> helpers/.libs/libnetsnmphelpers.so 
> ./.libs/libnetsnmpmibs.so: undefined reference to 
> `netsnmp_access_interface_ioctl_mtu_get'
> ./.libs/libnetsnmpmibs.so: undefined reference to 
> `netsnmp_access_interface_ioctl_flags_set'
> ./.libs/libnetsnmpmibs.so: undefined reference to `auto_nlist_noop'
> ./.libs/libnetsnmpmibs.so: undefined reference to 
> `netsnmp_access_interface_ioctl_ifindex_get'
> ./.libs/libnetsnmpmibs.so: undefined reference to 
> `netsnmp_access_interface_ioctl_physaddr_get'
> ../snmplib/.libs/libnetsnmp.so: undefined reference to 
> `netsnmp_container_null_init'
> ./.libs/libnetsnmpagent.so: undefined reference to 
> `netsnmp_check_transaction_id'
> ./.libs/libnetsnmpagent.so: undefined reference to `netsnmp_init_helpers'
> ./.libs/libnetsnmpmibs.so: undefined reference to 
> `var_ipAddrEntry(variable*, unsigned long*, unsigned int*, int, unsigned 
> int*, int (**)(int, unsigned char*, unsigned char, unsigned int, unsigned 
> char*, unsigned long*, unsigned int))'
> ./.libs/libnetsnmpmibs.so: undefined reference to 
> `netsnmp_access_interface_ioctl_flags_get'
> collect2: ld returned 1 exit status
> make: *** [snmpd] Error 1
> 
> 
> thanks
> 
> 
> 
> 
> 
> 
> 
> On 7/12/05, Magnus Fromreide <[EMAIL PROTECTED]> wrote:
> > 
> > On Tue, Jul 05, 2005 at 10:58:35PM -0400, Deepak Arya wrote:
> > > All,
> > > when i am trying to compile net-snmp 5.2.1 using g++ i am getting link
> > > error. i changed the Makefile in agent/ and mibgroup/ added my mymib.c &
> > > mymib.h file did make. was sucessfull to build mibgroup but when i am
> > > building agent/ getting the following error.
> > >
> > > Can anyone please tell me what i am doing wrong ?
> > 
> > You are trying to compile net-snmp using a C++ compiler?
> > 
> > net-snmp is _not_ written in the common subset of C and C++, the C++
> > compatibility is only that you should be able to use it from a C++
> > program.
> > 
> > That said, it looks as if you have specified the libraries in the wrong 
> > order,
> > if you could add the linker command line you are using that would make it 
> > a
> > lot easier to say more.
> > 
> > > thanks in advance.
> > >
> >

-- 
Magnus Fromreide                                        +46-13 17 68 48
Mårdtorpsgatan 21, 2tr                                  [EMAIL PROTECTED]
SE-584 34  LINKÖPING


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to