From: ooOoo <jg3...@ya...> - 2004-04-04 14:45:22
|
Thanks very much for the tips and helpful explanations. The following older message was also quite informative: http://sourceforge.net/mailarchive/message.php?msg_id=6293797 In case others have a need to make the occasional stand-alone program for friends, I will post what worked for me (note that I have been slow to make good use of pkg-config to manage libraries). ============================================================= 1. I created a separate plplot-5.3.0 installation just for static linking. I turned off everything I did not need by editing configure. Here are the options I used: with_debug=no with_opt=yes with_double=no with_profile=no with_warn=no with_pkgdir= with_rpath=yes with_nobraindead=no with_csa=no with_freetype=no with_qhull=no with_pthreads=no with_ltdlsystem=no enable_shared=no enable_drivers=yes enable_dyndrivers=no enable_f77=yes enable_cxx=yes enable_python=no enable_tcl=no enable_itcl=no enable_java=no enable_octave=no enable_gnome=no enable_ntk=no enable_tkwin=no enable_png=no enable_jpeg=no enable_cgm=no enable_tk=no enable_xwin=yes enable_ljii=yes enable_ljiip=yes enable_pbm=yes enable_ps=yes enable_pstex=yes enable_xfig=yes I then did "./configure --prefix=/usr/local/static", "make",and "make install". 2. To link my f77 programs, I found that the following flags worked: PLTLIBS = -L /usr/local/static/lib -lplplotf77 \ -lplplotcxx -lplplot XTRALIBS = -I/usr/local/static/include/plplot \ -L/usr/X11R6/lib \ -lX11 -lieee -lm -l pthread ... and I included the "-static" option on my link command. Next, I used "strip" to reduce the size (from 2.5 M to 1.5 M) of the executable files (the dynamically linked executables were only 55 k). 3. At first, the programs failed on a non-plplot computer, giving an error about missing font files. I copied the plplot font files (/usr/local/static/share/plplot5.3.0/plstnd5.fnt & plxtnd5.fnt) to the working directory, and then the programs ran fine. From a happy plplot user - jg. __________________________________ Do you Yahoo!? Yahoo! Small Business $15K Web Design Giveaway http://promotions.yahoo.com/design_giveaway/ |