Re: Undefined reference to custom function in separate header and c files
Ricardo Hillbrecht <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <CAG_Rr=0J+c2g-4EDJ-f-1UNPK4_BV=4afXH+q6n50Pfh4cd0tg@mail.gmail.com> |
I´m already using --with-libs="-lxxxx", but it think it applies to standard libs, not worded to custom .c and .h files, and these files won´t be visible in the whole agent compilation, they are used by one single table. Maybe the correct is to use LDFLAGS of configure script, but I could´t find any examples. Is someone doing the same, with custom functions in separate .c and .h files ? Ricardo 2012/5/29 Dave Shield <[email protected]> > On 23 May 2012 21:08, Ricardo Hillbrecht <[email protected]> wrote: > > When i call "make", to compile the custom MIB within the agent, I get > > an "undefined reference" error: > > > > ./.libs/libnetsnmpmibs.so: undefined reference to `customFunction' > > collect2: ld returned 1 exit status > > > > I think the .c and .h files with the custom functions need to be > > someway informed to the linker > > Just a guess, but: > > $ ./configure --help > > --with-libs=LIBS use LIBS as link time arguments to ld. > > > Try adding the appropriate "-lxxx" invocation here. > Or tweak the agent/Makefile to add this to LDFLAGS > > Dave > ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Net-snmp-users mailing list [email protected] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users