I am attempting to adapt netCDF3.6.2 to work in ROOT, as AstroROOT allows for the opening and processing of FITS files.
Earlier I, with help from Christian Holm Christensen and Rholfs Reiner in private emails, I was able to use rootcint to produce, compile, link and then load successfully the netcdf.so.
I then compiled a later version of ROOT (5.17.08) and have not been able to get a header file produced since.
I am using:
gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: /cardhu.b/gnatmail/release-gpl/build-cardhu/src/configure --prefix=/usr/gnat --enable-languages=c,ada --disable-nls --disable-libada --target=i686-pc-linux-gnu --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --enable-checking=release --enable-threads=posix
Thread model: posix
gcc version 4.1.3 20070403 for GNAT GPL 2007 (20070402)
On a Fedora Core 6 coLinux installation:
uname -a
Linux nulinux 2.6.22-co-0.8.0 #1 PREEMPT Sun Aug 19 15:33:13 CEST 2007 i686 i686 i386 GNU/Linux
On an old slow Gateway Celeron computer.
Today here is the outout from ROOT 5.16.00 compiled yesterday afternoon:
rootcint -f G__cdf.cxx -c -I. -I/opt/cern/root/include/ netcdfcpp.h LinkDef.h
Error: Symbol externMSC_EXTRAintncerr is not defined in current scope netcdf.h:940:
Error: Symbol externMSC_EXTRAintncopts is not defined in current scope netcdf.h:961:
Error: Missing one of ‘,;{’ expected at or after line 272.
Error: Unexpected end of file (G__fgetstream_template():2) ncvalues.h:280:
Error: Missing one of ‘{’ expected at or after line 280.
Error: Unexpected end of file (G__fignorestream():3) ncvalues.h:280:
Warning: Error occurred during reading source files
Warning: Error occurred during dictionary source generation
!!!Removing G__cdf.cxx G__cdf.h !!!
Error: rootcint: error loading headers…
g++ -c -O2 -Wall -fPIC -I. netcdf.cpp
netcdf.cpp: In member function `NcBool NcVar::set_cur(long int, long int, long int, long int, long int)’:
netcdf.cpp:1270: warning: comparison between signed and unsigned integer expressions
netcdf.cpp:1274: warning: comparison between signed and unsigned integer expressions
g++ -c -O2 -Wall -fPIC -I. ncvalues.cpp
ncvalues.cpp: In member function `virtual char NcValues_ncbyte::as_char(long int) const’:
ncvalues.cpp:80: warning: comparison is always false due to limited range of data type
I am attaching revelent (I hope) files.
With the previously produced netcdf.so, I had hoped to then compile the ANDI files and be able to, with cint, open and process mass spectrometry files.
That is a request for help in the future since I need this first.
Do I need to include a
#pragma link C++ global MSC_EXTRA
??
I am very confused with what exactly #prama does.
The G__NetCDF.cxx was produced on 11 NOV. I do not remember what version of ROOT I had installed at the time, the .h produced at the same time.
the LinkDef.h was an adaption of code sent to me by CHC, who went out of his way with effort to answer my private question.
The netcdf.h partial code is where I think that rootcint is unable to read the file.
Thank you.
usedLinkDef.h (287 Bytes)
netcdf.h.txt (682 Bytes)
G__NetCDF.h (1.09 KB)
G__NetCDF.cxx (6.21 KB)