So, if you want to use Part 2's ndfd library with Part 3's GIS examples, just run the supplied script (.sh) or batch (.bat) files in the ndfd subfolder of Part 3's p4g.zip to build the binaries that you'll need for the examples.
Run the appropriate script and specify the HTTP client to use and the location of its files. Use one of the following defines on the script command line:
./comp-fpc-lib.sh -dUseNSHttpClient -Fu~/Tools/nsunits-src
Another example, to compile the library on Windows, using Indy, enter something like this (adjust the path as needed):
comp-fpc-lib.bat -dUseIndyHttpClient -FuC:\Tools\indy
Note that Indy and Synapse require the OpenSSL libraries to communicate with sites that use the HTTPS protocol. On Mac and Linux, these libraries are already installed, but on Windows you'll need to obtain them yourself and place them somewhere on the path on in the same directory as the NDFD library. You can download them from here.
You do have WST, right? If not, change to a folder where you want to put the WST source files and check them out like this:
svn co https://svn.code.sf.net/p/lazarus-ccr/svn/wst/trunk .Documentation is here: http://wiki.freepascal.org/Web_Service_Toolkit
For example, to compile the library on Mac or Linux, using Synapse and the NDFD SOAP service, enter something like this:
./comp-fpc-lib.sh -dUseSynapseHttpClient -Fu~/Tools/synapse-trunk -dUseNdfdSoap -Fu~/Tools/WST
For example, to use the ndfd library with Python, compile the Python extension module using one or more of these:
comp-fpc-pymod.sh comp-fpc-pymod3.sh comp-fpc-pymod.batNdfdLib.pas is the Pascal wrapper class for the library. To use it with Lazarus, compile this Lazarus package:
lazbuild ndfd_pkg.lpkTo compile the .NET/Mono assembly that wraps the ndfd library, run one of these:
comp-cs-interop.sh comp-cs-interop.batOn Mac, you may prefer to work with the library as a framework. Once you've compiled the library, you can run a supplied script to create a framework for it:
create-framework.shTo use the NDFD.framework with Lazarus, compile this package:
lazbuild ndfd_framework_pkg.lpk
macpgmr (at) icloud (dot) com
First posted March 15, 2015; last edited July 17, 2017.