If you are trying for the command prompt … just don’t (it would not give you access to the function its defines anyway … unless I am mistaken on the ‘zlib.h’ you are refering to.
If you are trying from rootcint, modify your command from
I may be in the wrong forum. I was trying to include zlib.h from root, not rootcint. I have had no problems including other files such as iostream.h and iomanip.h. The error is occurring at the following lines:
#ifndef ZEXTERN
define ZEXTERN extern
#endif
This is from the zconf.h file that was included with root.
ROOT currently does not provide access from the prompt to the compiled method declared in zlib.h.
What is your purpose in trying to include zconf.h or zlib.h (if I understand what you are ultimately trying to do, I might be able to be more specific and helpfull in my comments ).
If you need to process an include file that include them you may have to code guard them:
#ifndef __CINT__
#include <zlib.h>
#endif
If you need to access the function defined in them, you need load them via ACLiC (so that it generates the appropriate dictionary:
I have a code from someone else called dump_data.cc that converts the raw data into ascii. The problem is that the data files are over 100 MB each in ascii, so I am trying to histogram the data without making the ascii files.
Within the dump_data.cc file, there is a command,
gzread(in,&x,sizeof(unsigned long));
which reads in a block of data from the raw data file and stores the value in x. If I could find another function to replace gzread, then I would not have to include zlib.h.
Thanks, the original code runs correctly now. I assume that the ‘+’ means that ROOT will compile the code first and make an executable with a ‘.so’ extension.
The only problem I have now is that ROOT functions, such as TH1F and TCanvas, are not recognized by the compiler. So, I get errors saying that they are undeclared functions.
I am going to need to histogram the results as the program loops through each data block to avoid the necessity of outputting to a file first.