viest / php-ext-xlswriter

🚀 PHP Extension for creating and reader XLSX files.
https://xlswriter.viest.me
BSD 2-Clause "Simplified" License
2.24k stars 229 forks source link

building on gentoo #448

Open ward3r opened 2 years ago

ward3r commented 2 years ago

Hello While installing on gentoo using command pecl install xlswriter

got following errors: In file included from /tmp/xlswriter/include/minizip/unzip.h:55, from /tmp/xlswriter/library/libxlsxio/lib/xlsxio_read.c:12: /tmp/xlswriter/include/minizip/ioapi.h:135:51: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘OF’ 135 | typedef voidpf (ZCALLBACK open_file_func) OF((voidpf opaque, const char filename, int mode)); | ^~ /tmp/xlswriter/include/minizip/ioapi.h:136:51: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘OF’ 136 | typedef uLong (ZCALLBACK read_file_func) OF((voidpf opaque, voidpf stream, void buf, uLong size)); | ^~

and so on

maybe this is because of macro OF and _Z_OF. but what should i do with this? please help

ward3r commented 2 years ago

resolved by adding export CFLAGS=' -DOF=_Z_OF' to /etc/profile