If you use SZ_1M to define READ_BUF_SIZE you also need to include the sizes.h header file which is apparently missing.