From: Joe C. <ch...@tr...> - 2006-09-15 17:57:50
|
Werner Smekal wrote: > Hi, > > I'm not sure, but I think Joe uses the plplot library and the wxwidgets > driver within his wxWidgets application. If you want to distribute this > application on Linux (and it should run on many different Linux > distributions), you have to compile wxWidgets as a static library - this > is what wxWidgets developers recommend. Than you also have to configure > and compile plplot as static and mix c and c++ in the library - but this > should be no problem for you, since your wxWidgets application is c++ > anyway. First, thank you (and others who have responded) for the assistance. Yes, my application, called extrema, is derived from a previous command driven app named physica. Physica has been in use at most physics labs around the world since 1993, and is mature software which started life on VAX/VMS and I have ported to alphaVMS, HP-UX, OSF, OSX, SGI/IRIX, SUNOS/SOLARIS, and Linux. See http://trshare.triumf.ca/~chuma/physica/homepage.html for info on physica. Extrema uses the wxWidgets package for the widgets and for the graphics, but it already has well developed graph plotting abilities. One feature that extrema is missing is 2D surface plots, and when I discovered PLplot's surface plotting capabilities, together with a simple interface to wxWidgets using wxDC's, it looked like a perfect fit. Until I tried running extrema on another Linux box. Without PLplot, extrema runs fine on other Linux boxes. I simply distribute the .so files with the executable and run the app from a shell script, setting LD_LIBRARY_PATH to the libs directory. I don't want the end user to be forced to install anything as root, since in many cases, they will not have that privilege. The wxWidgets .so files created under Scientific Linux 4.3 work fine under Red Hat 9. Extrema also works fine when wxWidgets is created statically, but I still have to distribute a few .so files from the pango, cairo and gtk packages. Anyway, everything works fine until I put PLplot into the mix. I am still confused by what you say above. Making static wxWidgets libs is no problem, but PLplot refuses to make a static wxwidgets driver. According to Alan Irwin: "To clarify the situation, for the Unix case, our CBS follows the same rules as our ABS, i.e., the psttf and wxwidgets C++ device drivers are turned off whenever dynamic devices are disabled." When I use the --disable-dyndrivers --disable-shared --enable-static flags with PLplot configure, the wxwidgets driver is not built. Are you saying that I must modify the configure/makefile structure in PLplot in order to get a static wxwidgets driver? > It's possible to configure everything so that it uses e.g. the wxWidgets > library provided by the distribution, but than it will only run on this > distribution, since the wxWidgets library on Linux has many dependencies > and you'll run into trouble very soon, i.e. on any other distribution. In my experience, I have not had much trouble distributing software for Linux. Programs built under RedHat 9 seemed to work fine under many other Linux distributions. When the kernel was upgraded to v2.6, most of my apps needed to be rebuilt, but that was not a problem. I just distribute 2 versions. Scientific Linux apps seem to run fine on most other Linux distributions, or is it just that most people in physics labs use the same Linux? > So, if you have a wxWidgets application - compile the libraries as > static libraries and everything should be ok. This is far from perfect > (shared would be better), but in the moment this is the way I would > recommend (because of the many different Linux distributions). If I could build PLplot with the wxwidgets driver as static libs, that would be great. If you can tell me how to do it, that would also be great, and I would appreciate it enormously. If I am simply missing something obvious, please let me know. Joe Chuma TRIUMF Canada's National Laboratory for Particle and Nuclear Physics |