From: Alan W. I. <ir...@be...> - 2005-11-21 17:32:12
|
On 2005-11-21 08:35+0100 Arjen Markus wrote: > ...Cygwin > ...trouble > with the iargc() and getarg() routines, used to obtain the (fortran) command-line > arguments.... That brings us to a new subject. Could you demonstrate with the short example below under what conditions iargc and getarg do not work for the Cygwin environment? ********** example to test iargc and getarg capability implicit none character*4 argument integer i write(*,*) 'number of arguments = ', iargc() do i = 1,5 call getarg(i,argument) write(*,'(i5,x,a4)') i, argument enddo end ********** On my system I obtain the following results: irwin@chickadee> g77 test_command_line_parse.f -o test_command_line_parse irwin@chickadee> ./test_command_line_parse a b c number of arguments = 3 1 a 2 b 3 c 4 5 Do you get a similar result? If that simple demonstration succeeds for you, will you please turn it into the form similar to the PLplot form that fails? That is, make the above fortran a separate routine in a one-routine shared library which is called from a main routine? That would allow you to make some easy experiments (such as trying the -fPIC option or not that we discussed before) to see what is the root of the shared library problem. If you do find a way to get the shared library version to work (such as using the -fPIC option), then I will take your solution to the libtool list so they can use it for a permanent solution. I found them to be most helpful and responsive when earlier this year we could demonstrate a clear MinGW libtool problem and solution. On the other hand, if there is no way you can find to make the shared library version work, then we should take that simple demonstration of the problem to the Cygwin development list so they can fix it. Alan __________________________ Alan W. Irwin email: ir...@be... phone: 250-727-2902 Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ |