How can I link the 3rd party library bzip2 in my gcc compiler?
问题 I'm a python developer new to C and developing C code on Windows that needs to work on Windows and Linux. To that end, I downloaded MSYS2 and used pacman to install gcc and bz2. My question is: How do I use bzip2 in my C code. When I try to compile this C code: #include <bzlib.h> using the command gcc test.c -lbzip2 -o test.out I get the following error: test.c:1:10: fatal error: bzlib.h: No such file or directory Am I including the correct header file? Am I linking it correctly? When not