How do I link my application to the netCDF Client Library?
If your application accesses netCDF data through the standard netCDF library, it should be fairly straight forward to relink it with the OPeNDAP enabled netCDF library. First off, you will need some OPeNDAP libraries: the third-party-packages libraries; the OPeNDAP core (DAP) libraries; and the OPeNDAP netCDF library (see the Note below for some comments on library and compiler compatibilities). Second, you need to link your application with these libraries. This should involve adding several library flags to your normal compiling/linking commands. In particular: • Instead of ‘-I/usr/local/netcdf/include’ use the results of ncdap-config –cflags • Instead of ‘-L/usr/local/netcdf/lib’ and ‘-lnetcdf’ use the results of ncdap-config –libs For instance, • OPeNDAP libnc-dap 3.7.4 release g++ -c -o sample.o `ncdap-config –cflags` sample.c g++ -g -o sample sample.o `ncdap-config –libs` Note: We have found that using our pre-built binary versions of the libraries for relinking with your app
Related Questions
- Will an application written to work with a newer (later) version of the HDF5 Library compile, link, and run as would be expected with an older (earlier) version of the library?
- Because the Standard Library does not ship with the operating system, how can my customer obtain the library so that my application will link cleanly on his system?
- After deploying the xMAM application on the client, only User View Manager link is visible. Do I need to do any configuration?