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.
- On many platforms one can remove conflict using linker magic.
On windows using `LoadLibrary' and `GetProcAddress' on DLL should work without conflict.
Perhaps, this is a good example why C fails in larger programs. And why pascal is needed.