On 2015-01-21 18:26+0100 Arnaud Darmont wrote: > Hi all, > > i'm just new to PLplot and today i successfully managed to install > MinGW, CMake and all the related stuff and then i compiled the DLL and A > files. It was not very easy but it seems that i got all files in the end. > > In a next step i tried to compile an example. I moved all .h files, .a > files, .dll files and the example's .c file into a test directory and > successfully compiled using "gcc -otest.exe lib...dll.a etc (the list of > all .a files)". > > When i run the file i get the error message that it couldn't find the > driver's directory. > > Note that i have built PLplot without the examples as i need to build my > own example separately in either Embarcadero C++ builder, devCpp or MinGW. > > I don't think i have any build issues, just need to find out what to do > with the drivers, where to locate them and so on. I have tried to move > the driver's directory into my projects directory without success. I > actually don't think that those files are the drivers. Should the > drivers be built separately? if yes, what is the cmake command to build > the drivers? Where will "make install" locate the drivers after i make > them with gcc. Why are they not compiler together with PLplot? > > I have found a discussion about the same issue on the mailing list but > the discussion ends without providing an answer.
As you have discovered, attempting to collect everything you need can be error-prone so instead use the cmake option -DCMAKE_INSTALL_PREFIX=<wherever you want the install prefix to be>, and after cmake is run, then run the command "make install" to collect all necessary PLplot files (including libraries, drivers, etc.) in an organized way in the install tree with the prefix location you have specified. Then change directories to $prefix/share/plplot5$version/examples (where $prefix is the above install prefix and $version refers to whatever version of plplot you have installed. In that location you will find two build systems for the installed examples which should give you some ideas about the best way to build your own applications against the PLplot libraries. 1. The traditional build system for the installed examples is based on make + pkg-config, and you can find out more about it by looking into the Makefile files in that installed examples directory and subdirectories. This build approach may or may not be suitable for your needs since it all depends on whether you have access to pkg-config which on Windows platforms is available for Cygwin, and the combination of MinGW-w64 + MSYS2, but not for MinGW alone (a quite different and much older project than MinGW-w64) or for the combination of MinGW + MSYS (where MSYS is a quite different and older project than MSYS2). To find out more about the MSYS2 possibility (which automatically includes MinGW-w64), take a look at http://sourceforge.net/p/msys2/wiki/Home/. 2. The CMake-based build system for the installed examples is implemented by the CMakeLists.txt file you will see in the installed examples directory and files it refers to there. The CMake-based approach is the one I recommend for you if you have some basic knowledge of CMake logic (or are willing to spend a day or so learning such basic knowledge) since it should work on any platform. To see this CMake-based build system in action you should (important! since this leaves the installed examples tree in a desireable pristine condition) create an intially empty build directory, change to that directory, (important!) put $install/bin on your PATH environment variable, then execute cmake $install/share/plplot5$version/examples to configure the build of the installed examples. Afterwards, you can build all examples by running, e.g., make VERBOSE=1 and you can also run some of those built examples using, e.g., c/x00c -dev psc -o test.psc to confirm, for example, that the drivers are being found properly. At this stage, you have two further choices. You could simply cut and paste from the make VERBOSE=1 results to figure out how to build your own code against PLplot or you could adapt the existing CMake-based build system for the installed examples (mostly by getting rid of large parts of it that are not relevant to your needs) to configure building your own examples against PLplot. 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); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); 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 __________________________ ------------------------------------------------------------------------------ New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet _______________________________________________ Plplot-general mailing list Plplot-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-general