title: Problems with ROOT and libbz2
body: <p>I'm trying to use libbz2 library with ROOT framework but I haven't reached any success.
  I wrote test app without ROOT using libbz2 and it works fine. Here is my code:</p>
  
  <pre><code>#ifndef BZlib_H
  #define BZlib_H
  
  #include &lt;bzlib.h&gt;
  #include &lt;iostream&gt;
  
  class BZlib : public std::streambuf, virtual public std::istream
  {
  BZFILE * fbz2File;
  ...
  }
  </code></pre>
  
  <p>He is my makefile:</p>
  
  <pre><code>CC=g++
  TARGET=bzip_happiness
  HEADERS=$(wildcard *.h)
  SOURCES=$(wildcard *.cpp)
  OBJECTS=$(SOURCES:.cpp=.o)
  
  # Flags
  CXXFLAGS = -c -g
  
  all: $(TARGET)
  
  $(OBJECTS): $(HEADERS)
  
  .cpp.o:
      $(CC) -Wall $(CXXFLAGS) $&lt; -o $@
  
  $(TARGET): $(OBJECTS)
      $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) -L. -lbz2 -Wl,-rpath,.
  
  clean:
      rm -f $(TARGET) $(OBJECTS)
  
  .PHONY: all clean
  </code></pre>
  
  <p>When I try to use this code with the ROOT framework, compilation fails with the following message:</p>
  
  <pre><code>&gt;  - Generating dictionary BBaseCint.cc
  rootcint -f BBaseCint.cc \
  -c -I. -I../mfileio -I../mfbase -I../mastro -I../MBase -I../mbase -I../mgui -DMARSVER=\"2.4\" -D__MARS__   BZlib.h  BBaseIncl.h BBaseLinkDef.h 
  Error: Too many '}' /usr/include/bzlib.h:275:
  make: *** [BBaseCint.cc] Segmentation fault
  make: *** Deleting file `BBaseCint.cc'
  </code></pre>
  
  <p>All my code is the same except the headers:</p>
  
  <pre><code>#ifndef BZlib_H
  #define BZlib_H
  
  #ifndef ROOT_TObject
  #include &lt;TObject.h&gt;
  #endif
  
  #include &lt;bzlib.h&gt;
  #include &lt;iostream&gt;
  
  class BZlib : public std::streambuf, virtual public std::istream, public TObject
  {
  private:
      BZFILE * fbz2File;
      ...
      ClassDef(BZlib, 0)
  };
  #endif
  </code></pre>
  
  <p>Line 275 in bzlib.h contains the following code: </p>
  
  <pre><code>#ifdef __cplusplus
  }
  #endif
  </code></pre>
  
  <p>which is the closing brace for</p>
  
  <pre><code>#ifdef __cplusplus
  extern "C" {
  #endif
  </code></pre>
  
  <p>How can I solve the problem?</p>