On 2007-09-07 01:09-0400 Salazar, German P21322 wrote: > > Well, yes, as a matter of fact, we built plplot to generate static libraries; > and I am also compiling a program to staticly link those libraries. > > As far as platform and the like info goes, right now I am in Linux; but I > will be doing the same thing for Solaris and Windows. > > I am using the gcc and g95 compilers in all three platforms. > > While we are using cmake to compile plplot, I am NOT using it to compile my > own fortran program that uses plplot. > > After taking a look at one of the files used by plplot, it seems as if plplot > links in all the drivers all the time...so, I started to include some, too > (as hinted by the messages), until all the "undefined reference" messages > disappeared. Here is what I ended up with: > > g95 -I/usw/ude/Linux/include \ > -L/usw/ude/Linux/lib \ > -r8 -Bstatic -s -ffixed-line-length-132 -ftrace=full \ > -o try try.f \ > -lplplotf77d -lplplotf77cd -lplplotd \ > -lgd \ > -ltcl8.4 \ > -ltk8.4 \ > -lhpdf \ > -lm \ > -lcsirocsa > > Directory /usw/ude/Linux is where we install our third party software, like > plplot. > > Basically, the libraries that I thought I should not need but had to add > anyway are: > -lgd \ > -ltcl8.4 \ > -ltk8.4 \ > -lhpdf \ > > Who knows, eventually, I may have to add other things like the ones that show > up in the files used by plplot: png, z, jpeg, xwin, X11, Xext, SM and ICE...I > think I will know when, except for SM and ICE...what is that? > > So, that's that, and if that's the way plplot works, fine; it does not seem > ideal, but now I know. > > So, it looks like I am in business.
That's good to hear. Nevertheless, instead of being so specific above with your link flags, have you tried using pkg-config instead just like our compilation of the installed examples does? pkg-config is a very popular application on Linux (also buildable on Unix) which conveniently delivers all the compile and link flags required to build applications that use given packages such as PLplot. (cmake will warn you if you don't have pkg-config installed.) pkg-config is just a convenient small application that is completely independent of CMake. I had thought all along that perhaps you might have found a bug in how we configured pkg-config for the static libraries case, but now it turns out you have not been using pkg-config to build your applications. In any case, I would be most interested in your (static-build) results for running make in the _installed_ $prefix/share/plplot5.7.4/examples directory. That make command should run pkg-config appropriately to build the examples, and you should be able to follow that convenient cookbook when building your own applications as well. Alan __________________________ Alan W. Irwin 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 libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Plplot-general mailing list Plplot-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-general