From: Arjen M. <Arj...@de...> - 2015-01-26 08:01:47
|
Hi John, I will have a closer look at this. Regards, Arjen From: John Baumgardner [mailto:jrb...@co...] Sent: Monday, January 26, 2015 1:58 AM To: Arjen Markus; Alan W. Irwin Cc: plp...@li... Subject: [Plplot-general] How Do I Link Correctly To the Libraries Under 5.10.0? Hi Arjen and Alan, After achieving apparent success several days ago compiling and linking my application code under plplot-5.10.0, for some reason things ceased to work. The make process could no longer find the required libraries. So I went to examples/f95 and imitated (I think) the makefile I found there (Makefile.examples). Here is the resulting makefile I am attempting to use: F95 = /usr/bin/gfortran.exe FFLAGS = -fdefault-real-8 -O3 PKG_CONFIG_ENV = PKG_CONFIG_PATH="/home/johnrb/plplot-5.10.0/build_dir/lib/pkgconfig" RPATHCMD = -Wl,-rpath -Wl,/home/johnrb/plplot-5.10.0/build_dir/lib sphplt : sphplt.o graphx.o $(F95) $(FFLAGS) $(RPATHCMD) -o sphplt \ `$(PKG_CONFIG_ENV) pkg-config --cflags --libs plplotd-f95` \ sphplt.o graphx.o -lplplotd -lplplotf95d -lplplotf95cd Here is what I get when I do the make: $ make -f makesph /usr/bin/gfortran.exe -fdefault-real-8 -O3 -Wl,-rpath -Wl,/home/johnrb/plplot-5.10.0/build_dir/lib -o sphplt \ `PKG_CONFIG_PATH="/home/johnrb/plplot-5.10.0/build_dir/lib/pkgconfig" pkg-config --cflags --libs plplotd-f95` \ sphplt.o graphx.o -lplplotd -lplplotf95d -lplplotf95cd /usr/lib/gcc/x86_64-pc-cygwin/4.8.3/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lplplotf95d-11.0.0 /usr/lib/gcc/x86_64-pc-cygwin/4.8.3/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lplplotf95cd-11.0.0 collect2: error: ld returned 1 exit status makesph:8: recipe for target 'sphplt' failed make: *** [sphplt] Error 1 Any ideas as to what I am doing wrong? Thanks for any help you can provide. John P.S. Here is the pkgconfig/plplotd-f95.pc file: libdir=/home/johnrb/plplot-5.10.0/build_dir/bin includedir=/home/johnrb/plplot-5.10.0/build_dir/include/plplot drvdir=/home/johnrb/plplot-5.10.0/build_dir/lib/plplot5.10.0/driversd Name: PLplot F95 Description: Scientific plotting library (F95 bindings, double precision) Requires: plplotd Version: 5.10.0 Libs: -L${libdir} -lplplotf95d-11.0.0 -lplplotf95cd-11.0.0 Cflags: -I${includedir} -I/home/johnrb/plplot-5.10.0/build_dir/lib/fortran/modules/plplot Question: Why is libdir set to /bin and not /lib? /bin does not have libplplotf95d-11.0.0 while /lib does. 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. |