Open MartinDelille opened 11 months ago
Are you referring to:
../Qt/6.5.1/gcc_64/lib/libQt6Core5Compat.so.6: error adding symbols: DSO missing from command line
Today was my first attempt to use quazip. I was struggled to compile .so library (it could not find FindQt6.cmake) for Qt6 but finally done that with:
cmake -D QUAZIP_QT_MAJOR_VERSION=6 -DCMAKE_PREFIX_PATH="/home/user/Qt6/6.5.1/gcc_64/lib/cmake"
I have now all .so libs in my project tree:
libquazip1-qt6.so
libquazip1-qt6.so.1.4
libquazip1-qt6.so.1.4.0
My .pro file:
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
CONFIG += c++17
# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
SOURCES += \
main.cpp \
mainwindow.cpp \
quazip/quazip/JlCompress.cpp \
quazip/quazip/qioapi.cpp \
quazip/quazip/quaadler32.cpp \
quazip/quazip/quachecksum32.cpp \
quazip/quazip/quacrc32.cpp \
quazip/quazip/quagzipfile.cpp \
quazip/quazip/quaziodevice.cpp \
quazip/quazip/quazip.cpp \
quazip/quazip/quazipdir.cpp \
quazip/quazip/quazipfile.cpp \
quazip/quazip/quazipfileinfo.cpp \
quazip/quazip/quazipnewinfo.cpp
HEADERS += \
mainwindow.h \
quazip/quazip/JlCompress.h \
quazip/quazip/ioapi.h \
quazip/quazip/minizip_crypt.h \
quazip/quazip/quaadler32.h \
quazip/quazip/quachecksum32.h \
quazip/quazip/quacrc32.h \
quazip/quazip/quagzipfile.h \
quazip/quazip/quaziodevice.h \
quazip/quazip/quazip.h \
quazip/quazip/quazip_global.h \
quazip/quazip/quazip_qt_compat.h \
quazip/quazip/quazipdir.h \
quazip/quazip/quazipfile.h \
quazip/quazip/quazipfileinfo.h \
quazip/quazip/quazipnewinfo.h \
quazip/quazip/unzip.h \
quazip/quazip/zip.h
FORMS += \
mainwindow.ui
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
LIBS += -lz
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/quazip/quazip/release/ -lquazip1-qt6
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/quazip/quazip/debug/ -lquazip1-qt6
else:unix: LIBS += -L$$PWD/quazip/quazip/ -lquazip1-qt6
INCLUDEPATH += $$PWD/quazip/quazip
DEPENDPATH += $$PWD/quazip/quazip
But I stuck on two errors:
:-1: error: quazip.o: undefined reference to symbol '_ZNK10QTextCodec11fromUnicodeERK7QString@@Qt_6'
:-1: error: /home/user/Qt6/6.5.1/gcc_64/lib/libQt6Core5Compat.so.6: error adding symbols: DSO missing from command line
:-1: error: collect2: error: ld returned 1 exit status
I'm on linux Mint and at this point google doesn't find any solution :(
Yes QTextCodec::fromUnicode() is the reason Qt6::Core5Compat is required. I personally moved to minizip since Core5Compat was an issue on my project.
I looked into this for a bit.
QTextCodec is used all over the place, including public facing methods so it would warrant minor, if not major version bump because it might break existing code.
Second thing is how to go about refactoring this. Doing it in existing codebase by ifdefs and macros seems like a terrible idea. Maybe master
should start tracking the current Qt version and drop support for older versions, while at the same time keeping a qt5
branch which would receive only critical updates. They could be tagged 6.X
and 5.X
respectively.
Thoughts?
Hello I submit a pull request about that
Is there any plan to remove Qt6::Core5Compat dependency ?