Re: [evlog-dev] more plugin questions
Steve Woodruff <[email protected]> Fri, 7 Mar 2003 12:11:40 -0800 (PST)
| Newsgroups | gmane.linux.kernel.event-logging |
|---|---|
| Message-ID | <[email protected]> |
Mark, It looks like you're trying to build this as an executable and you need to be creating it as a shared library. Check the source for the sample_be plugin and you should be able to mimick what it does for compiling and linking. you don't want to use cc to link since your plugin is probally already defining _init() and _fini().... use ld. /steve --- Mark Megerian <[email protected]> wrote: > I am now trying to build this on my system, and I am > having some problems. > > Here is what I am getting: > > > make db2plugin > > cc db2plugin.o -o db2plugin > db2plugin.o: In function `_init': > db2plugin.o(.text+0x19c): multiple definition of > `_init' > /usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crti.o(.init+0x0): > first > defined here > db2plugin.o: In function `_fini': > db2plugin.o(.text+0x1a4): multiple definition of > `_fini' > /usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crti.o(.fini+0x0): > first > defined here > /usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crt1.o: > In function > `_start': > /usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crt1.o(.text+0x18): > undefined reference to `main' > db2plugin.o: In function `_evlInitPlugIn': > db2plugin.o(.text+0x4f): undefined reference to > `getConfigStringParam' > db2plugin.o: In function `printStringWithNewlines': > db2plugin.o(.text+0x4f1): undefined reference to > `_evlEndsWith' > db2plugin.o(.text+0x557): undefined reference to > `assert' > db2plugin.o: In function `printRecord': > db2plugin.o(.text+0x659): undefined reference to > `_evlGetMaxDumpLen' > db2plugin.o(.text+0x69d): undefined reference to > `evl_format_evrec_fixed' > db2plugin.o(.text+0x773): undefined reference to > `_evlDumpBytes' > db2plugin.o(.text+0x790): undefined reference to > `assert' > collect2: ld returned 1 exit status > make: *** [db2plugin] Error 1 > > I suspect this has something to do with missing > source, headers, etc. If > so, please give me the steps on how to get the right > pieces onto my system. > > At this point, all I've done is copied over the > sample_be code, modified it > to db2plugin, changed the .conf and the Makefile, > and also copied over > callback.h and evl_util.h and that's where I am now. > > Sorry to be a pest, but I am stuck. > > thanks- > > > Mark Megerian (507) 253-1682 > Senior Software Engineer (Dept 45H) > [email protected] > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Etnus, makers of > TotalView, The debugger > for complex code. Debugging C/C++ programs can leave > you feeling lost and > disoriented. TotalView can help you find your way. > Available on major UNIX > and Linux platforms. Try it free. www.etnus.com > _______________________________________________ > evlog-developers mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/evlog-developers ===== ---------------------------------------------------------- Steve Woodruff, N9OH @ 42.18N 88.34W, [email protected] __________________________________________________ Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, more http://taxes.yahoo.com/ ------------------------------------------------------- This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for complex code. Debugging C/C++ programs can leave you feeling lost and disoriented. TotalView can help you find your way. Available on major UNIX and Linux platforms. Try it free. www.etnus.com