Open KelvinYJY opened 5 years ago
Try to use vs2017. https://github.com/QtExcel/QXlsx/blob/master/TestEnv.md
@KelvinYJY The thing is that the developer has used vs2017 and latest Qt for building it. If you want to use the same thing, then use the same msvc and qt version. Other option as you mentioned is the provide private folder paths in the include section.
This may be related to issue 64 (CMake support).
I tried to build the library with Cmake but I ran into trouble with the use of private headers as well. As far as I understand it, Qmake (not Cmake) can use them by including something like: QT += gui-private Only Cmake has no such option. By forcing some fixed paths in the Qxlsx library and Qt5 code itself I can get a little further, but this results in linker errors later.
Is there a way to NOT use Qt private libraries?
I will include my (failed) attempt with Cmake here as example. Qxlsx-lib.zip This was build on Windows 10, using MinGW-32, Qt5.14.x, Cmake and Ninja. I used VS Code as IDE.
Dear @tlouwers
Private classes is used for zip library(or something).
If your project is based on cmake, I recommend using xlnt.
@j2doll @tlouwers
I also faced this issue under Qt MSVC2017 + Cmake + VS2019, I noticed that its caused by the "Qt Visual Studio Tools" Plugin. If we open the QXlsx.pro file using Qt VS Tools, it will auto generate QXlsx.vcxproj file. but the option "gui-private" is incroectlly replaced with "gui", so we got this build error.
So we have to manual open the QXlsx.vcxproj file and replace "gui" to "gui-private", then you can be build successfully. Just for your reference.
Regards, Wen
The QZipWriter is private class in private/qzipwriter_p.h . Don't use it. Suggest to reimplement QZipWriter in the project.
I only use gcc and QtCreator. If anyone knows VS+Qt well, please answer or pull-request.
Solved on Debian by install qt6-base-private-dev
When I compile QXlsx\source\xlsxzipwriter.cpp in vs2013 and qt 5.9.1, error is throwed : “private/qzipwriter_p.h”: No such file or directory . I have found this in Qt5.9.1\5.9.1\msvc2013_64\include\QtGui\5.9.1\QtGui\private, and finally I compile successfully after adding these include path: Qt\Qt5.9.1\5.9.1\msvc2013_64\include\QtCore\5.9.1, C:\Qt\Qt5.9.1\5.9.1\msvc2013_64\include\QtGui\5.9.1\, C:\Qt\Qt5.9.1\5.9.1\msvc2013_64\include\QtGui\5.9.1\QtGui\