plplot

Ryan Schmidt ryandesign at macports.org
Wed Apr 7 02:12:57 UTC 2021



On Apr 6, 2021, at 20:36, Brian Miller wrote:

> Brian thinks that -I/opt/local/lib/fortran/modules/plplot x00f.f90 -o x00f should be appearing someplace else within this program, but doesn’t see it. Can you please tell him where to look for it?
> 
> Thank you!
> 
> (base) Amys-iMac:x00f bmiller$ gfortran-mp-10 -ffpe-trap=invalid,zero,overflow -fcheck=all -finit-real=nan -g -I/opt/local/lib/fortran/modules/plplot x00f.f90 -o x00f
> Undefined symbols for architecture x86_64:
>   "___plfortrandemolib_MOD_arange_1", referenced from:
>       _MAIN__ in ccZG237q.o
>   "___plplot_MOD_plend_impl", referenced from:
>       _MAIN__ in ccZG237q.o
>   "___plplot_MOD_plinit_impl", referenced from:
>       _MAIN__ in ccZG237q.o
>   "___plplot_MOD_pllab_impl", referenced from:
>       _MAIN__ in ccZG237q.o
>   "___plplot_MOD_plparseopts_brief", referenced from:
>       _MAIN__ in ccZG237q.o
>   "___plplot_double_MOD_plenv_impl", referenced from:
>       _MAIN__ in ccZG237q.o
>   "___plplot_double_MOD_plline_impl", referenced from:
>       _MAIN__ in ccZG237q.o
> ld: symbol(s) not found for architecture x86_64
> collect2: error: ld returned 1 exit status

Searching DuckDuckGo for "undefined symbols ___plfortrandemolib_MOD_arange_1" I found this result:


https://stackoverflow.com/questions/53960548/compiling-plplot-with-gfortran


It says:

> The correct compilation command for the above code is
> 
> gfortran x00f.f90 -lplfortrandemolib $(pkg-config --cflags --libs plplot-fortran) 

Based on this information, I changed your compile command to:


gfortran-mp-10 -ffpe-trap=invalid,zero,overflow -fcheck=all -finit-real=nan -g -lplfortrandemolib $(pkg-config --cflags --libs plplot-fortran) x00f.f90 -o x00f


This compiled successfully and runs:


./x00f

Plotting Options:
 < 1> aqt        AquaTerm - Mac OS X
 < 2> xwin       X-Window (Xlib)
 < 3> ps         PostScript File (monochrome)
 < 4> psc        PostScript File (color)
 < 5> xfig       Xfig file
 < 6> null       Null device
 < 7> mem        User-supplied memory device
 < 8> psttf      PostScript File (monochrome)
 < 9> psttfc     PostScript File (color)
 <10> svg        Scalable Vector Graphics (SVG 1.1)
 <11> pdf        Portable Document Format PDF
 <12> xcairo     Cairo X Windows Driver
 <13> pdfcairo   Cairo PDF Driver
 <14> epscairo   Cairo EPS Driver
 <15> pscairo    Cairo PS Driver
 <16> svgcairo   Cairo SVG Driver
 <17> pngcairo   Cairo PNG Driver
 <18> memcairo   Cairo memory driver
 <19> extcairo   Cairo external context driver

Enter device number or keyword:




More information about the macports-users mailing list