From: Arjen M. <Arj...@de...> - 2015-01-19 09:44:13
|
Hi John, > -----Original Message----- > From: Alan W. Irwin [mailto:ir...@be...] > Sent: Sunday, January 18, 2015 2:49 AM > To: John Baumgardner > Cc: plp...@li... > Subject: Re: [Plplot-general] plwidth fails to link under Cygwin against plplot5.9.10 > libraries > > However, the good news is I found what I needed (circle.f and how you built it) to > figure out this problem which turns out not to be specific to Cygwin. > > > $ compile.sh > > circle.f:26.72: > > > > call plline(n101,xx,yy) > > > > 1 > > Error: There is no specific subroutine for the generic 'plline' at (1) > This is a typical message relating to the available interfaces for plline. The thing is that with Fortran 95 and beyond you can define a single interface name to be applied to multiple implementations. The compiler looks at the actual argument list and decides to use the implementation that matches that list (by number of arguments and the type, kind and rank of each). If it can not find any matching implementation, it will respond with a message like the above. For the Fortran 95 bindings we have used the features provided by that standard as much as possible. One is that arrays "know" their size. So the routine plline queries the arrays xx and yy for their size and there is no need to pass the size explicitly. That method is actually rather error-prone. If you want to pass a section of the array only, you can use: Call plline( xx(1:10), yy(1:10) ) For instance. > I verified that issue. To solve it, I simply used the redacted form of > subroutine/function call with the redundant dimension information dropped, i.e., > > call plline(xx,yy) > > Note, it is quite a while since we have used the f77 interface so my original advice to > you was incomplete about converting over to f95. I should have also added to the > "use plplot" advice that since we dropped f77, our f95 capabilities and API have > evolved and, for example, we are now taking advantage of certain Fortran 95 > capabilities like knowing the redundant array dimensions. So you have to use the > redacted form (like above with redundant dimension information dropped) of all calls. > > When in doubt about exactly what the redacted form is, look at files in examples/f95/ > for working examples of all the calls to the PLplot Fortran binding API. > Regards, Arjen DISCLAIMER: This message is intended exclusively for the addressee(s) and may contain confidential and privileged information. If you are not the intended recipient please notify the sender immediately and destroy this message. Unauthorized use, disclosure or copying of this message is strictly prohibited. The foundation 'Stichting Deltares', which has its seat at Delft, The Netherlands, Commercial Registration Number 41146461, is not liable in any way whatsoever for consequences and/or damages resulting from the improper, incomplete and untimely dispatch, receipt and/or content of this e-mail. |