Topic: multiple definition

SimplyFortran 3.31
dismg_d.a of Dislin & libappgraphics.a of Appgraphics have same function "line"
Error:
d:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/lib/../lib\libappgraphics.a(drawing.o):drawing.c:(.text+0x13e0): multiple definition of `line'
c:\dislin\dismg_d.a(line.o):line.c:(.text+0x476e): first defined here
collect2.exe: error: ld returned 1 exit status

Re: multiple definition

I'm not surprised they both have a definition of line.  Is there a reason you're trying to use them together?  I would think combining DISLIN and AppGraphics would lead to many such issues.

Jeff Armstrong
Approximatrix, LLC

Re: multiple definition

jeff wrote:

I'm not surprised they both have a definition of line.  Is there a reason you're trying to use them together?  I would think combining DISLIN and AppGraphics would lead to many such issues.

Aplot needs more features like Dislin.

Re: multiple definition

Unfortunately, we don't have any plans to extend Aplot at this time.  Adding DISLIN-like features would be a substantial undertaking.

Jeff Armstrong
Approximatrix, LLC

Re: multiple definition

I tried to fix it with two methods.
1.use appgraphics,only:lineA=>line
2.(moveto,lineto) replaced line subroutine
But they are all failed.
Why?

Re: multiple definition

The error is produced by the linker, not the compiler.  The linker is encountering two different line procedures and failing.  Even if you don't explicitly use line, there is a good chance it still needs to be linked due to some lower-level calls in the libraries.

Are you attempting to incorporate AppGraphics/Aplot and DISLIN in the same program?

Jeff Armstrong
Approximatrix, LLC

Re: multiple definition

Dislin Widget replace Appgraphics,it is very useful.
GUI + Ploting

Re: multiple definition

I would definitely use DISLIN's plotting routines as well in that case.  They are far superior to Aplot.  Mixing the two just won't work because of the API conflict you reported.

Jeff Armstrong
Approximatrix, LLC