From: Arjen M. <Arj...@de...> - 2015-01-23 15:13:29
|
Hi Arnaud, Just chiming in on this (just returned from a short business trip) - I am sure Alan can and will help you out with this. Otherwise I will do my best to fill in the details for the MinGW platform. Regards, Arjen > -----Original Message----- > From: Arnaud Darmont [mailto:ada...@ap...] > Sent: Wednesday, January 21, 2015 11:10 PM > To: Alan W. Irwin > Cc: plp...@li... > Subject: Re: [Plplot-general] Trying to build examples > > Alan, > > thank you for the detailed answer. Cmake is what i'm trying to use. > > As i understand this won't be easy and i fear that there will be deployment difficulties > on customer systems. My goal would be to distribute an executable of the final > software along with the source so that they can just run it without any installation. > Will in the end PLplot allow for this or is it the wrong library? > > Thank you. > > > > > On 1/21/2015 8:56 PM, Alan W. Irwin wrote: > > 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 > > __________________________ > > > > > > -- > APHESA > Arnaud Darmont > CEO > > Direct Tel: +32 (0)4 365 06 80 > Mobile: +32 (0)472 643 620 > General Tel: +32 (0)4 366 18 70 > Fax: +32 (0)4 366 08 10 > > Rue de Lorcé, 39 > B-4920 HARZE > BELGIUM > > www.aphesa.com > > Twitter: @Aphesa > > > ------------------------------------------------------------------------------ > 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 > Plp...@li... > https://lists.sourceforge.net/lists/listinfo/plplot-general 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. |