On 18 Mar 2005 at 14:28, Waldek Hebisch wrote:
Prof A Olowofoyeku wrote:
Hi
I have produced a GPC interface unit for GNU plotutils (courtesy of the "headconv" program). However, there is a problem. Trying to compile a test program gives this error:
"d:/mingw/bin/../lib/gcc-lib/mingw32/3.2.3/libgpc.a(init.o): In function `p_initialize': d:/src/mingw/gcc-3.2.3/gcc/p/rts/init.pas:266: multiple definition of `_p_initialize' d:/mingw/lib/libplot.a(p_defplot.o):p_defplot.c:(.text+0x0): first defined here"
"p_defplot.c" has this: void #ifdef _HAVE_PROTOS _p_initialize (S___(Plotter *_plotter)) #else _p_initialize (S___(_plotter)) S___(Plotter *_plotter;) #endif
Any ideas?
- Rename one of the offending symbols. IIRC `_p_initialize' is
appears only twice in GPC sources. Or rename it in libplot.
I would move to rename it in GPC.
- On many platforms one can remove conflict using linker magic.
On windows using `LoadLibrary' and `GetProcAddress' on DLL should work without conflict.
Unfortunately, I have a static version of libplot the libraries. I built it myself, and it was rather straightforward. Indeed, I propose to release the binaries sometime, since I was never able to find prebuilt Win32 binaries.
To build it into a Windows DLL with gcc would require alchemy ...
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.greatchief.plus.com/