[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #SEZ-677429]: what minimum files are needed to build C++



>
> Ed:> But why don't you just build the netCDF C++ library with the usual
configure/make commands, and let the netCDF configure script figure out which
files you need.> Just build netCDF in the usual way and you will get a netCDF
C++ library:
> Do you -- or NO ONE -- at UCAR know what files are needed to build the
interface?

Well, if anyone should know, it should be me, since I am the one who wrote the
automake files! ;-)

However, it is not as simple a question as you think. The configure scripts and
automake files combine to create the build system for any given platform, and,
in general, it may not be the same from one platform to the other. That is part
of what the autotools (autoconf/automake/libtool - the tools used to package
netCDF for distribution.

Do a configure with options --disable-f77 --disable-examples
--disable-utilities.

This will build a C and C++ library for your platform. If you look at the
output of make, you will see what files it calls.

Certainly all of the code in libsrc and cxx is required. If you look in the
Makefile.am you can see them listed, or you can just build the C++ API and see
what files it uses.

But it seems highly unlikely to me that you really need to do this!

>
> PLEASE go to root.cern.ch/
> and look at what it can do.
>
> PLEASE check out isdc.unige.ch/index.cgi?Soft+astroroot
>

Root seems to be a package for doing statistical analysis and graphing. Looks
very nice. AstroROOT is a branch o this package with specializations for
astronomical data analysis. Neat! ;-)

> and see that FITS (Flexible Image Transport System) has been ported to ROOT.

Yes, I'm familiar with FITS, but never worked with it directly.

>
> ROOT is written in C++, software can be integrated into it, so that cint, the
C++ interpreter that is the >'command language' can understand the new
commands, it needs to build a dictionary, and that has to be done >using ROOT
tools.

You should be able to build netCDF normally, then just include the library
location and name on the link line when compiling your C++ extensions into
AstroROOT. I am CCing their user support to ask them if this is correct.

>
> There must be someone who can tell me the answer to my question.

What faith! :-)

>
>
> How do I join a user list?

For all netCDF information, see the home page:
http://www.unidata.ucar.edu/software/netcdf/

For mailing list, see:
http://www.unidata.ucar.edu/software/netcdf/docs/faq.html#maillist

The support archive can be searched here:
http://www.unidata.ucar.edu/search.jsp?support&netcdf

Searching for ROOT shows me this, in which I give you substantially the same
answer (but with more detail) from last November. Well, you gotta give me this
- I'm consistent! ;-)

http://www.unidata.ucar.edu/support/help/MailArchives/netcdf/msg04521.html

But if you think that you must build the C++ API yourself, then look at the
output of the make and you can easily see all the files involved. The
high-level config.h file is generated by the configure run - just run it one
time and use the config.h that it generates. The last support response lists
the individual C++ files.

The config.h will only be built for the platform you are working on, so your
code will possibly not work on other platforms.

The ncopts issue you refer to in previous mail is caused by the netCDF version
2 API, which uses 2 global variables. Just define two ints in one of your
header files:

int ncerr = NC_NOERR ;
int ncopts = (NC_FATAL | NC_VERBOSE) ;

It doesn't matter what you set them to, since you won't be using the V2 API
anyway.

Good luck!

Ticket Details
===================
Ticket ID: SEZ-677429
Department: Support netCDF
Priority: Normal
Status: Closed