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.
> 
> 
> ./.libs/libnetsnmpagent.so: undefined reference to 
> `netsnmp_free_request_data_sets'
> ./.libs/libnetsnmpagent.so: undefined reference to `netsnmp_add_list_data'
> ./.libs/libnetsnmpmibs.so: undefined reference to 
> `netsnmp_handler_check_cache'
> ./.libs/libnetsnmpmibs.so: undefined reference to 
> `netsnmp_insert_iterator_context'
> ./.libs/libnetsnmpagent.so: undefined reference to 
> `netsnmp_create_data_list'
> ./.libs/libnetsnmpmibs.so: undefined reference to `netsnmp_insert_table_row'
> ./.libs/libnetsnmpagent.so: undefined reference to 
> `netsnmp_free_all_list_data'
> ./.libs/libnetsnmpmibs.so: undefined reference to 
> `netsnmp_access_interface_ioctl_mtu_get'
> helpers/.libs/libnetsnmphelpers.so: undefined reference to 
> `netsnmp_init_bulk_to_next_helper()'
> ./.libs/libnetsnmpmibs.so: undefined reference to 
> `netsnmp_access_interface_ioctl_flags_set'
> helpers/.libs/libnetsnmphelpers.so: undefined reference to 
> `netsnmp_free_agent_data_sets'
> ./.libs/libnetsnmpagent.so: undefined reference to `netsnmp_get_list_data'
> ./.libs/libnetsnmpmibs.so: undefined reference to `auto_nlist_noop'
> helpers/.libs/libnetsnmphelpers.so: undefined reference to 
> `netsnmp_call_handler'
> helpers/.libs/libnetsnmphelpers.so: undefined reference to 
> `netsnmp_table_data_replace_row'
> helpers/.libs/libnetsnmphelpers.so: undefined reference to 
> `netsnmp_init_serialize()'
> ./.libs/libnetsnmpmibs.so: undefined reference to 
> `netsnmp_access_interface_ioctl_ifindex_get'
> helpers/.libs/libnetsnmphelpers.so: undefined reference to 
> `netsnmp_init_debug_helper()'
> ./.libs/libnetsnmpmibs.so: undefined reference to 
> `netsnmp_extract_table_info'
> ./.libs/libnetsnmpmibs.so: undefined reference to 
> `netsnmp_access_interface_ioctl_physaddr_get'
> helpers/.libs/libnetsnmphelpers.so: undefined reference to 
> `netsnmp_call_next_handler'
> helpers/.libs/libnetsnmphelpers.so: undefined reference to 
> `netsnmp_agent_get_list_data'
> helpers/.libs/libnetsnmphelpers.so: undefined reference to 
> `netsnmp_request_get_list_data'
> helpers/.libs/libnetsnmphelpers.so: undefined reference to 
> `netsnmp_request_add_list_data'
> ./.libs/libnetsnmpmibs.so: undefined reference to 
> `netsnmp_create_delegated_cache'
> ../snmplib/.libs/libnetsnmp.so: undefined reference to 
> `netsnmp_container_null_init'
> helpers/.libs/libnetsnmphelpers.so: undefined reference to 
> `netsnmp_get_list_node'
> helpers/.libs/libnetsnmphelpers.so: undefined reference to 
> `netsnmp_init_read_only_helper()'
> ./.libs/libnetsnmpagent.so: undefined reference to `netsnmp_init_helpers'
> ./.libs/libnetsnmpmibs.so: undefined reference to 
> `netsnmp_extract_iterator_context'
> ./.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'
> helpers/.libs/libnetsnmphelpers.so: undefined reference to 
> `netsnmp_init_table_dataset()'
> helpers/.libs/libnetsnmphelpers.so: undefined reference to 
> `netsnmp_agent_add_list_data'
> ./.libs/libnetsnmpmibs.so: undefined reference to 
> `netsnmp_free_delegated_cache'collect2: ld returned 1 exit status
> make: *** [snmpd] Error 1

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


-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to