Re[2]: kdelibs build error (missed bzCompress)

Данила Левин dendy_ua at bk.ru
Wed May 9 17:03:58 CEST 2007


> You have another bzip.h somewhere around (or fetched an old version, please use current version from kdewin-installer). FindBZip2.cmake checks for BZ2_ prefix. To rerun the test, remove all BZIP2 - variables from CMakeCache.txt and execute cmake.
> The check for BZ2_-prefix must not fail on windows! If it fails your bzip2 headers/libs are wrong :)
> 
> Christian
> -- 


I think I founded root of the problem.

First, bzlib.h exactly in one place: win32libs/include dir and was successfuly founded by CMake and compiler. When I removing bzlib.h from win32libs/include dir nmake shows: Cannot open include file 'bzlib.h'

But this header declares those API functions as:

BZ_EXTERN int BZ_API(BZ2_bzCompressInit) ( 
      bz_stream* strm, 
      int        blockSize100k, 
      int        verbosity, 
      int        workFactor 
   );

So to compile we need to:
#define NEED_BZ2_PREFIX

But it is not defined! Why? Error in CMake script?

To resolve this problem I have to edit config.h file in build directory and add:

#define   HAVE_BZIP2_SUPPORT 1
/* Define if the libbz2 functions need the BZ2_ prefix */
/* #undef   NEED_BZ2_PREFIX 1 */
#define   NEED_BZ2_PREFIX 1                  <<<<< THIS LINE WAS ADDED BY ME

Is this a right way?



More information about the Kde-windows mailing list