Compilation error - missing zlib.h

后端 未结 5 1360
灰色年华
灰色年华 2021-01-30 10:22

I am trying to compile software on Blue Gene Q using IBM XL compilers and I got this error message:

\"iostreams/zlib.cpp\", line 19.10: 1540-0836 (S) The #includ         


        
5条回答
  •  后悔当初
    2021-01-30 10:36

    You are missing zlib.h header file, on Linux install it via:

    sudo apt-get install libz-dev
    

    As a matter of fact, the module presents as zlib1g-dev in the apt repo, so this is the up-to-date call (Feb 2019):

    sudo apt install zlib1g-dev
    

    On Fedora: sudo dnf install zlib-devel (in older versions: sudo dnf install libz-devel).

    This will provide the development support files for a library implementing the deflate compression method found in gzip and PKZIP.

    If you've already zlib library, make sure you're compiling your code sources with -lz. See: How to fix undefined references to inflate/deflate functions?.

提交回复
热议问题