brechtsanders / xlsxio

XLSX I/O - C library for reading and writing .xlsx files
MIT License
417 stars 112 forks source link

Can't compile, Fedora 30 #65

Closed ikino closed 4 years ago

ikino commented 4 years ago

Hello

i can't compile under Fedora 30 64bit.

c++ -m32 -DCHARCONV_ENABLED -DOpenXLSX_EXPORTS -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Isrc/ -I. -o src/XLAbstractXMLFile_Impl.o -c src/XLAbstractXMLFile_Impl.cpp
In file included from src/XLDocument_Impl.h:59,
                 from src/XLAbstractXMLFile_Impl.cpp:7:
src/XLWorkbook_Impl.h:51:19: error: variant: No such file or directory
In file included from /usr/lib/gcc/i686-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cstdint:35,
                 from src/XLDefinitions.h:49,
                 from src/XLEnums_impl.h:8,
                 from src/XLRelationships_Impl.h:55,
                 from src/XLWorkbook_Impl.h:55,
                 from src/XLDocument_Impl.h:59,
                 from src/XLAbstractXMLFile_Impl.cpp:7:
/usr/lib/gcc/i686-redhat-linux/4.4.7/../../../../include/c++/4.4.7/c++0x_warning.h:31:2: error: #error This file requires compiler and library support for the upcoming ISO C++ standard, C++0x. This support is currently experimental, and must be enabled with the -std=c++0x or -std=gnu++0x compiler options.
In file included from src/XLEnums_impl.h:8,
                 from src/XLRelationships_Impl.h:55,
                 from src/XLWorkbook_Impl.h:55,
                 from src/XLDocument_Impl.h:59,
                 from src/XLAbstractXMLFile_Impl.cpp:7:
src/XLDefinitions.h:59:35: warning: multi-character character constant
src/XLDefinitions.h:61:36: warning: missing terminating ' character
In file included from src/XLEnums_impl.h:8,
                 from src/XLRelationships_Impl.h:55,
                 from src/XLWorkbook_Impl.h:55,
                 from src/XLDocument_Impl.h:59,
                 from src/XLAbstractXMLFile_Impl.cpp:7:
src/XLDefinitions.h:61: error: missing terminating ' character
In file included from src/XLWorkbook_Impl.h:56,
                 from src/XLDocument_Impl.h:59,
                 from src/XLAbstractXMLFile_Impl.cpp:7:
src/XLSharedStrings_Impl.h:51:23: error: string_view: No such file or directory
In file included from src/XLDocument_Impl.h:64,
                 from src/XLAbstractXMLFile_Impl.cpp:7:
src/XLDefinitions.h:61:36: warning: missing terminating ' character
In file included from src/XLAbstractXMLFile_Impl.h:56,
                 from src/XLAppProperties_Impl.h:50,
                 from src/XLDocument_Impl.h:57,
                 from src/XLAbstractXMLFile_Impl.cpp:7:
src/XLXml_Impl.h:13: error: expected nested-name-specifier before ‘XMLNode’
src/XLXml_Impl.h:13: error: ‘XMLNode’ has not been declared
src/XLXml_Impl.h:13: error: expected ‘;’ before ‘=’ token
src/XLXml_Impl.h:13: error: expected unqualified-id before ‘=’ token
src/XLXml_Impl.h:14: error: expected nested-name-specifier before ‘XMLAttribute’
src/XLXml_Impl.h:14: error: ‘XMLAttribute’ has not been declared
src/XLXml_Impl.h:14: error: expected ‘;’ before ‘=’ token
src/XLXml_Impl.h:14: error: expected unqualified-id before ‘=’ token
src/XLXml_Impl.h:15: error: expected nested-name-specifier before ‘XMLDocument’
src/XLXml_Impl.h:15: error: ‘XMLDocument’ has not been declared
src/XLXml_Impl.h:15: error: expected ‘;’ before ‘=’ token
src/XLXml_Impl.h:15: error: expected unqualified-id before ‘=’ token
src/XLXml_Impl.h:17: error: ‘XMLNode’ does not name a type
In file included from src/XLAppProperties_Impl.h:50,
                 from src/XLDocument_Impl.h:57,
                 from src/XLAbstractXMLFile_Impl.cpp:7:
src/XLAbstractXMLFile_Impl.h:58: error: expected ‘{’ before ‘::’ token
src/XLAbstractXMLFile_Impl.h:59: error: expected constructor, destructor, or type conversion before ‘{’ token
src/XLAbstractXMLFile_Impl.cpp:98: error: expected ‘}’ at end of input
make: *** [src/XLAbstractXMLFile_Impl.o] Error 1

error.txt

brechtsanders commented 4 years ago

What are you compiling exactly?Those files are not part of the XLSX I/O library -------- Original message --------From: ikino notifications@github.com Date: 01/04/20 15:49 (GMT+01:00) To: brechtsanders/xlsxio xlsxio@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [brechtsanders/xlsxio] Can't compile, Fedora 30 (#65)

Hello

i can't compile under Fedora 30 64bit.

c++ -m32 -DCHARCONV_ENABLED -DOpenXLSX_EXPORTS -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Isrc/ -I. -o src/XLAbstractXMLFile_Impl.o -c src/XLAbstractXMLFile_Impl.cpp

In file included from src/XLDocument_Impl.h:59,

             from src/XLAbstractXMLFile_Impl.cpp:7:

src/XLWorkbook_Impl.h:51:19: error: variant: No such file or directory

In file included from /usr/lib/gcc/i686-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cstdint:35,

             from src/XLDefinitions.h:49,

             from src/XLEnums_impl.h:8,

             from src/XLRelationships_Impl.h:55,

             from src/XLWorkbook_Impl.h:55,

             from src/XLDocument_Impl.h:59,

             from src/XLAbstractXMLFile_Impl.cpp:7:

/usr/lib/gcc/i686-redhat-linux/4.4.7/../../../../include/c++/4.4.7/c++0x_warning.h:31:2: error: #error This file requires compiler and library support for the upcoming ISO C++ standard, C++0x. This support is currently experimental, and must be enabled with the -std=c++0x or -std=gnu++0x compiler options.

In file included from src/XLEnums_impl.h:8,

             from src/XLRelationships_Impl.h:55,

             from src/XLWorkbook_Impl.h:55,

             from src/XLDocument_Impl.h:59,

             from src/XLAbstractXMLFile_Impl.cpp:7:

src/XLDefinitions.h:59:35: warning: multi-character character constant

src/XLDefinitions.h:61:36: warning: missing terminating ' character

In file included from src/XLEnums_impl.h:8,

             from src/XLRelationships_Impl.h:55,

             from src/XLWorkbook_Impl.h:55,

             from src/XLDocument_Impl.h:59,

             from src/XLAbstractXMLFile_Impl.cpp:7:

src/XLDefinitions.h:61: error: missing terminating ' character

In file included from src/XLWorkbook_Impl.h:56,

             from src/XLDocument_Impl.h:59,

             from src/XLAbstractXMLFile_Impl.cpp:7:

src/XLSharedStrings_Impl.h:51:23: error: string_view: No such file or directory

In file included from src/XLDocument_Impl.h:64,

             from src/XLAbstractXMLFile_Impl.cpp:7:

src/XLDefinitions.h:61:36: warning: missing terminating ' character

In file included from src/XLAbstractXMLFile_Impl.h:56,

             from src/XLAppProperties_Impl.h:50,

             from src/XLDocument_Impl.h:57,

             from src/XLAbstractXMLFile_Impl.cpp:7:

src/XLXml_Impl.h:13: error: expected nested-name-specifier before ‘XMLNode’

src/XLXml_Impl.h:13: error: ‘XMLNode’ has not been declared

src/XLXml_Impl.h:13: error: expected ‘;’ before ‘=’ token

src/XLXml_Impl.h:13: error: expected unqualified-id before ‘=’ token

src/XLXml_Impl.h:14: error: expected nested-name-specifier before ‘XMLAttribute’

src/XLXml_Impl.h:14: error: ‘XMLAttribute’ has not been declared

src/XLXml_Impl.h:14: error: expected ‘;’ before ‘=’ token

src/XLXml_Impl.h:14: error: expected unqualified-id before ‘=’ token

src/XLXml_Impl.h:15: error: expected nested-name-specifier before ‘XMLDocument’

src/XLXml_Impl.h:15: error: ‘XMLDocument’ has not been declared

src/XLXml_Impl.h:15: error: expected ‘;’ before ‘=’ token

src/XLXml_Impl.h:15: error: expected unqualified-id before ‘=’ token

src/XLXml_Impl.h:17: error: ‘XMLNode’ does not name a type

In file included from src/XLAppProperties_Impl.h:50,

             from src/XLDocument_Impl.h:57,

             from src/XLAbstractXMLFile_Impl.cpp:7:

src/XLAbstractXMLFile_Impl.h:58: error: expected ‘{’ before ‘::’ token

src/XLAbstractXMLFile_Impl.h:59: error: expected constructor, destructor, or type conversion before ‘{’ token

src/XLAbstractXMLFile_Impl.cpp:98: error: expected ‘}’ at end of input

make: *** [src/XLAbstractXMLFile_Impl.o] Error 1

error.txt

—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or unsubscribe.

[

{

"@context": "http://schema.org",

"@type": "EmailMessage",

"potentialAction": {

"@type": "ViewAction",

"target": "https://github.com/brechtsanders/xlsxio/issues/65",

"url": "https://github.com/brechtsanders/xlsxio/issues/65",

"name": "View Issue"

},

"description": "View this Issue on GitHub",

"publisher": {

"@type": "Organization",

"name": "GitHub",

"url": "https://github.com"

}

}

]

ikino commented 4 years ago

I'm sorry, I paste wrong output. Problem is voidpf. Steps:

git clone ...
mkdir xlsxio-build
cd xlsxio
cmake ../xlsxio
make

Now right:

make
[  4%] Building C object CMakeFiles/xlsxio_read_SHARED.dir/lib/xlsxio_read.c.o
/tmp/xlsxio/lib/xlsxio_read.c:390:1: error: unknown type name ‘voidpf’; did you mean ‘void’?
  390 | voidpf ZCALLBACK minizip_io_filehandle_open_file_fn (voidpf opaque, const char* filename, int mode)
      | ^~~~~~
      | void
/tmp/xlsxio/lib/xlsxio_read.c:390:18: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘minizip_io_filehandle_open_file_fn’
  390 | voidpf ZCALLBACK minizip_io_filehandle_open_file_fn (voidpf opaque, const char* filename, int mode)
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/xlsxio/lib/xlsxio_read.c:397:1: error: unknown type name ‘uLong’; did you mean ‘ulong’?
  397 | uLong ZCALLBACK minizip_io_filehandle_read_file_fn (voidpf opaque, voidpf stream, void* buf, uLong size)
      | ^~~~~
      | ulong
/tmp/xlsxio/lib/xlsxio_read.c:397:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘minizip_io_filehandle_read_file_fn’
  397 | uLong ZCALLBACK minizip_io_filehandle_read_file_fn (voidpf opaque, voidpf stream, void* buf, uLong size)
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/xlsxio/lib/xlsxio_read.c:414:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘minizip_io_filehandle_close_file_fn’
  414 | int ZCALLBACK minizip_io_filehandle_close_file_fn (voidpf opaque, voidpf stream)
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/xlsxio/lib/xlsxio_read.c:422:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘minizip_io_filehandle_testerror_file_fn’
  422 | int ZCALLBACK minizip_io_filehandle_testerror_file_fn (voidpf opaque, voidpf stream)
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/xlsxio/lib/xlsxio_read.c:427:16: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘minizip_io_filehandle_tell_file_fn’
  427 | long ZCALLBACK minizip_io_filehandle_tell_file_fn (voidpf opaque, voidpf stream)
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/xlsxio/lib/xlsxio_read.c:432:16: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘minizip_io_filehandle_seek_file_fn’
  432 | long ZCALLBACK minizip_io_filehandle_seek_file_fn (voidpf opaque, voidpf stream, uLong offset, int origin)
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/xlsxio/lib/xlsxio_read.c: In function ‘xlsxioread_open_filehandle’:
/tmp/xlsxio/lib/xlsxio_read.c:460:41: error: request for member ‘opaque’ in something not a structure or union
  460 |     if ((minizip_io_filehandle_functions.opaque = malloc(sizeof(struct minizip_io_filehandle_data))) == NULL) {
      |                                         ^
/tmp/xlsxio/lib/xlsxio_read.c:464:36: error: request for member ‘zopen_file’ in something not a structure or union
  464 |     minizip_io_filehandle_functions.zopen_file = minizip_io_filehandle_open_file_fn;
      |                                    ^
/tmp/xlsxio/lib/xlsxio_read.c:464:50: error: ‘minizip_io_filehandle_open_file_fn’ undeclared (first use in this function); did you mean ‘minizip_io_filehandle_functions’?
  464 |     minizip_io_filehandle_functions.zopen_file = minizip_io_filehandle_open_file_fn;
      |                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                  minizip_io_filehandle_functions
/tmp/xlsxio/lib/xlsxio_read.c:464:50: note: each undeclared identifier is reported only once for each function it appears in
/tmp/xlsxio/lib/xlsxio_read.c:465:36: error: request for member ‘zread_file’ in something not a structure or union
  465 |     minizip_io_filehandle_functions.zread_file = minizip_io_filehandle_read_file_fn;
      |                                    ^
/tmp/xlsxio/lib/xlsxio_read.c:465:50: error: ‘minizip_io_filehandle_read_file_fn’ undeclared (first use in this function); did you mean ‘minizip_io_filehandle_functions’?
  465 |     minizip_io_filehandle_functions.zread_file = minizip_io_filehandle_read_file_fn;
      |                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                  minizip_io_filehandle_functions
/tmp/xlsxio/lib/xlsxio_read.c:466:36: error: request for member ‘zwrite_file’ in something not a structure or union
  466 |     minizip_io_filehandle_functions.zwrite_file = /*minizip_io_filehandle_write_file_fn*/NULL;
      |                                    ^
/tmp/xlsxio/lib/xlsxio_read.c:467:36: error: request for member ‘ztell_file’ in something not a structure or union
  467 |     minizip_io_filehandle_functions.ztell_file = minizip_io_filehandle_tell_file_fn;
      |                                    ^
/tmp/xlsxio/lib/xlsxio_read.c:467:50: error: ‘minizip_io_filehandle_tell_file_fn’ undeclared (first use in this function); did you mean ‘minizip_io_filehandle_functions’?
  467 |     minizip_io_filehandle_functions.ztell_file = minizip_io_filehandle_tell_file_fn;
      |                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                  minizip_io_filehandle_functions
/tmp/xlsxio/lib/xlsxio_read.c:468:36: error: request for member ‘zseek_file’ in something not a structure or union
  468 |     minizip_io_filehandle_functions.zseek_file = minizip_io_filehandle_seek_file_fn;
      |                                    ^
/tmp/xlsxio/lib/xlsxio_read.c:468:50: error: ‘minizip_io_filehandle_seek_file_fn’ undeclared (first use in this function); did you mean ‘minizip_io_filehandle_functions’?
  468 |     minizip_io_filehandle_functions.zseek_file = minizip_io_filehandle_seek_file_fn;
      |                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                  minizip_io_filehandle_functions
/tmp/xlsxio/lib/xlsxio_read.c:469:36: error: request for member ‘zclose_file’ in something not a structure or union
  469 |     minizip_io_filehandle_functions.zclose_file = minizip_io_filehandle_close_file_fn;
      |                                    ^
/tmp/xlsxio/lib/xlsxio_read.c:469:51: error: ‘minizip_io_filehandle_close_file_fn’ undeclared (first use in this function); did you mean ‘minizip_io_filehandle_functions’?
  469 |     minizip_io_filehandle_functions.zclose_file = minizip_io_filehandle_close_file_fn;
      |                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                   minizip_io_filehandle_functions
/tmp/xlsxio/lib/xlsxio_read.c:470:36: error: request for member ‘zerror_file’ in something not a structure or union
  470 |     minizip_io_filehandle_functions.zerror_file = minizip_io_filehandle_testerror_file_fn;
      |                                    ^
/tmp/xlsxio/lib/xlsxio_read.c:470:51: error: ‘minizip_io_filehandle_testerror_file_fn’ undeclared (first use in this function)
  470 |     minizip_io_filehandle_functions.zerror_file = minizip_io_filehandle_testerror_file_fn;
      |                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/xlsxio/lib/xlsxio_read.c:471:73: error: request for member ‘opaque’ in something not a structure or union
  471 |     ((struct minizip_io_filehandle_data*)minizip_io_filehandle_functions.opaque)->filehandle = filehandle;
      |                                                                         ^
/tmp/xlsxio/lib/xlsxio_read.c: At top level:
/tmp/xlsxio/lib/xlsxio_read.c:497:1: error: unknown type name ‘voidpf’; did you mean ‘void’?
  497 | voidpf ZCALLBACK minizip_io_memory_open_file_fn (voidpf opaque, const char* filename, int mode)
      | ^~~~~~
      | void
/tmp/xlsxio/lib/xlsxio_read.c:497:18: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘minizip_io_memory_open_file_fn’
  497 | voidpf ZCALLBACK minizip_io_memory_open_file_fn (voidpf opaque, const char* filename, int mode)
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/xlsxio/lib/xlsxio_read.c:508:1: error: unknown type name ‘uLong’; did you mean ‘ulong’?
  508 | uLong ZCALLBACK minizip_io_memory_read_file_fn (voidpf opaque, voidpf stream, void* buf, uLong size)
      | ^~~~~
      | ulong
/tmp/xlsxio/lib/xlsxio_read.c:508:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘minizip_io_memory_read_file_fn’
  508 | uLong ZCALLBACK minizip_io_memory_read_file_fn (voidpf opaque, voidpf stream, void* buf, uLong size)
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/xlsxio/lib/xlsxio_read.c:529:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘minizip_io_memory_close_file_fn’
  529 | int ZCALLBACK minizip_io_memory_close_file_fn (voidpf opaque, voidpf stream)
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/xlsxio/lib/xlsxio_read.c:538:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘minizip_io_memory_testerror_file_fn’
  538 | int ZCALLBACK minizip_io_memory_testerror_file_fn (voidpf opaque, voidpf stream)
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/xlsxio/lib/xlsxio_read.c:543:16: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘minizip_io_memory_tell_file_fn’
  543 | long ZCALLBACK minizip_io_memory_tell_file_fn (voidpf opaque, voidpf stream)
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/xlsxio/lib/xlsxio_read.c:550:16: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘minizip_io_memory_seek_file_fn’
  550 | long ZCALLBACK minizip_io_memory_seek_file_fn (voidpf opaque, voidpf stream, uLong offset, int origin)
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/xlsxio/lib/xlsxio_read.c: In function ‘xlsxioread_open_memory’:
/tmp/xlsxio/lib/xlsxio_read.c:600:37: error: request for member ‘opaque’ in something not a structure or union
  600 |     if ((minizip_io_memory_functions.opaque = malloc(sizeof(struct minizip_io_memory_data))) == NULL) {
      |                                     ^
/tmp/xlsxio/lib/xlsxio_read.c:604:32: error: request for member ‘zopen_file’ in something not a structure or union
  604 |     minizip_io_memory_functions.zopen_file = minizip_io_memory_open_file_fn;
      |                                ^
/tmp/xlsxio/lib/xlsxio_read.c:604:46: error: ‘minizip_io_memory_open_file_fn’ undeclared (first use in this function); did you mean ‘minizip_io_memory_handle’?
  604 |     minizip_io_memory_functions.zopen_file = minizip_io_memory_open_file_fn;
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                              minizip_io_memory_handle
/tmp/xlsxio/lib/xlsxio_read.c:605:32: error: request for member ‘zread_file’ in something not a structure or union
  605 |     minizip_io_memory_functions.zread_file = minizip_io_memory_read_file_fn;
      |                                ^
/tmp/xlsxio/lib/xlsxio_read.c:605:46: error: ‘minizip_io_memory_read_file_fn’ undeclared (first use in this function); did you mean ‘minizip_io_memory_handle’?
  605 |     minizip_io_memory_functions.zread_file = minizip_io_memory_read_file_fn;
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                              minizip_io_memory_handle
/tmp/xlsxio/lib/xlsxio_read.c:606:32: error: request for member ‘zwrite_file’ in something not a structure or union
  606 |     minizip_io_memory_functions.zwrite_file = /*minizip_io_memory_write_file_fn*/NULL;
      |                                ^
/tmp/xlsxio/lib/xlsxio_read.c:607:32: error: request for member ‘ztell_file’ in something not a structure or union
  607 |     minizip_io_memory_functions.ztell_file = minizip_io_memory_tell_file_fn;
      |                                ^
/tmp/xlsxio/lib/xlsxio_read.c:607:46: error: ‘minizip_io_memory_tell_file_fn’ undeclared (first use in this function); did you mean ‘minizip_io_memory_handle’?
  607 |     minizip_io_memory_functions.ztell_file = minizip_io_memory_tell_file_fn;
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                              minizip_io_memory_handle
/tmp/xlsxio/lib/xlsxio_read.c:608:32: error: request for member ‘zseek_file’ in something not a structure or union
  608 |     minizip_io_memory_functions.zseek_file = minizip_io_memory_seek_file_fn;
      |                                ^
/tmp/xlsxio/lib/xlsxio_read.c:608:46: error: ‘minizip_io_memory_seek_file_fn’ undeclared (first use in this function); did you mean ‘minizip_io_memory_handle’?
  608 |     minizip_io_memory_functions.zseek_file = minizip_io_memory_seek_file_fn;
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                              minizip_io_memory_handle
/tmp/xlsxio/lib/xlsxio_read.c:609:32: error: request for member ‘zclose_file’ in something not a structure or union
  609 |     minizip_io_memory_functions.zclose_file = minizip_io_memory_close_file_fn;
      |                                ^
/tmp/xlsxio/lib/xlsxio_read.c:609:47: error: ‘minizip_io_memory_close_file_fn’ undeclared (first use in this function); did you mean ‘minizip_io_memory_handle’?
  609 |     minizip_io_memory_functions.zclose_file = minizip_io_memory_close_file_fn;
      |                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                               minizip_io_memory_handle
/tmp/xlsxio/lib/xlsxio_read.c:610:32: error: request for member ‘zerror_file’ in something not a structure or union
  610 |     minizip_io_memory_functions.zerror_file = minizip_io_memory_testerror_file_fn;
      |                                ^
/tmp/xlsxio/lib/xlsxio_read.c:610:47: error: ‘minizip_io_memory_testerror_file_fn’ undeclared (first use in this function)
  610 |     minizip_io_memory_functions.zerror_file = minizip_io_memory_testerror_file_fn;
      |                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/xlsxio/lib/xlsxio_read.c:611:65: error: request for member ‘opaque’ in something not a structure or union
  611 |     ((struct minizip_io_memory_data*)minizip_io_memory_functions.opaque)->data = data;
      |                                                                 ^
/tmp/xlsxio/lib/xlsxio_read.c:612:65: error: request for member ‘opaque’ in something not a structure or union
  612 |     ((struct minizip_io_memory_data*)minizip_io_memory_functions.opaque)->datalen = datalen;
      |                                                                 ^
/tmp/xlsxio/lib/xlsxio_read.c:613:65: error: request for member ‘opaque’ in something not a structure or union
  613 |     ((struct minizip_io_memory_data*)minizip_io_memory_functions.opaque)->freedata = freedata;
      |                                                                 ^
make[2]: *** [CMakeFiles/xlsxio_read_SHARED.dir/build.make:63: CMakeFiles/xlsxio_read_SHARED.dir/lib/xlsxio_read.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:283: CMakeFiles/xlsxio_read_SHARED.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
brechtsanders commented 4 years ago

Which version of minizip are you using? Currently only version 1 is supported (tested with 1.1 and 1.2.8). I recently tries with minizip 2.9.2 and saw work is needed to support it...

ikino commented 4 years ago

I use

libzip-1.5.2-1.fc30.x86_64
libzip-devel-1.5.2-1.fc30.x86_64
brechtsanders commented 4 years ago

That's libzip, but the errors show you were compiling against minizip. Which version of minizip do you have? Does it compile when you build with libzip (with CMake flag -DWITH_LIBZIP:BOOL=ON)?

ikino commented 4 years ago

I don't have minizip. In requirements is wrote "minizip or libzip (libxlsxio_read and libxlsxio_write)" So, is minizip required?

ikino commented 4 years ago

I install minizip minizip-compat-1.2.11-19.fc30.x86_64 minizip-devel-2.9.1-1.fc30.x86_64 minizip-2.9.1-1.fc30.x86_64 After rerunning cmake on clean dir, still same error

ikino commented 4 years ago

That's libzip, but the errors show you were compiling against minizip. Which version of minizip do you have? Does it compile when you build with libzip (with CMake flag -DWITH_LIBZIP:BOOL=ON)?

Yes, with that flag now it works... With minizip no. Thanks...

brechtsanders commented 4 years ago

I'm glad it works for you now. Like I said earlier, currently only MiniZIP v1 is supported.

Baggins800 commented 2 years ago

I know this issue is closed, but I also ran into a similar problem. Is there any chance the minimum CMake version can be bumped to 3.19? Then this can easily be solved with ranged versions like 1<=version<2, e.g.

FIND_PACKAGE(Minizip 1...2 REQUIRED)

We can do something similar with zlib this we use a newer minimum CMake.