[Kst] creating a new datasource reader

Brisset, Nicolas Nicolas.Brisset at eurocopter.com
Wed Mar 16 16:16:29 CET 2005


> I have been following the template in Appendix C of the KST 
> handbook to create a datasource reader for netCDF files.  I 
> have finished writing the code for the .h and .cpp files and 
> have also made the .desktop file.
Well, you should have looked at kst CVS as I have programmed the netCDF
datasource a couple of weeks ago and it was commited back then, even
though I believe the autoconf tests are not there yet so that it
probably won't compile by default. (George, could you please quickly do
the necessary changes, basically the same as for CDF but checking for
-lnetcdf and netcdfcpp.h ?) I have since then discovered that in some
cases there may be interferences with the ASCII datasource, which
improperly detects the .nc files as ASCII and gets to read them. I
suppose increasing the value returned in understands_netcdf() would fix
this, but I have not had time to check it. Feel free to investigate this
:-)

> Following the instructions in Appendix C, I edited 
> kst/datasources/Makefile.am so that SUBDIRS contains the name 
> of this new subdirectory, and I created a Makefile.am file in 
> this new subdirectory.
> However, when I try to compile, I get the following error message:
Autotools are powerful, but not very easy to get used to :-) I believe
you have to add some lines in the top autoconf.in file, then run
autoconf and possibly other auto* commands. Alternatively, wait for
netcdf to be activated in CVS and grab the latest snapshot. I would
rather recommend the latter solution.

Nicolas


More information about the Kst mailing list