I'm trying to add OpenXLSX to my QtCreator project but following this guide I can't seem to get QtCreator to find the header file.
The QtCreator manual mentions .lib files which this library doesn't use so I'm kinda lost with that guide. I googled around and tried adding all the headers and sources from OpenXLSX/@library/@openxlsx/interfaces/c++/
to my headers and sources directories in the project tree. Yet I still get
exceltest.cpp:3: error: 'OpenXLSX.h' file not found
Line 3 is
#include "OpenXLSX.h"
I've also tried
#include "3rdparty/OpenXLSX/@library/@openxlsx/interfaces/c++/headers/OpenXLSX.h"
The 3rdparty directory being in the same location as exceltest.pro
I've also tried both with angle brackets.
I don't need any advanced functionality from OpenXLSX, just reading and writing values to cells I specify to either .xlsx or .xls. I'm also not married to the idea of using OpenXLSX so if anyone knows excel any libraries that would work better I'm open to the idea.
EDIT: So after I added my headers and sources to the project tree, my exceltest.pro looks like this. I tried putting this line
#include "3rdparty/OpenXLSX/@library/@openxlsx/interfaces/c++/headers/OpenXLSX.h"
into exceltest.h instead of exceltest.cpp and I'm getting different errors. QtCreator seems to find the library files but is something wrong with the library? These are the errors:
In file included from J:/George/Coding/Qt/Test/exceltest/3rdparty/OpenXLSX/@library/@openxlsx/interfaces/c++/headers/XLCell.h:49:0,
from ..\exceltest\3rdparty\OpenXLSX\@library\@openxlsx\interfaces\c++\sources\XLCell.cpp:5:
J:/George/Coding/Qt/Test/exceltest/3rdparty/OpenXLSX/@library/@openxlsx/interfaces/c++/headers/XLDefinitions.h:57:35: warning: multi-character character constant [-Wmultichar]
constexpr uint32_t maxRows = 1'048'576;
^~~~~
J:/George/Coding/Qt/Test/exceltest/3rdparty/OpenXLSX/@library/@openxlsx/interfaces/c++/headers/XLDefinitions.h:59:36: warning: missing terminating ' character
constexpr uint16_t maxCols = 16'384;
^
J:/George/Coding/Qt/Test/exceltest/3rdparty/OpenXLSX/@library/@openxlsx/interfaces/c++/headers/XLDefinitions.h:59:36: error: missing terminating ' character
constexpr uint16_t maxCols = 16'384;
^~~~~
..\exceltest\3rdparty\OpenXLSX\@library\@openxlsx\interfaces\c++\sources\XLCellRange.cpp:5:10: fatal error: XLCellRange.h: No such file or directory
#include <XLCellRange.h>
^~~~~~~~~~~~~~~
compilation terminated.
..\exceltest\3rdparty\OpenXLSX\@library\@openxlsx\interfaces\c++\sources\XLCellReference.cpp:5:10: fatal error: XLCellReference.h: No such file or directory
#include <XLCellReference.h>
^~~~~~~~~~~~~~~~~~~