Solved Libtag on windows, no rule to make target ?
-
-
Okay, I'm sorry ! I will do it for the next.
Now I m on Linux, I think I will have more help with it.
So I have here my librarie :
https://postimg.org/image/xub51veer/
I'm suprise that there is a *.a and *_c.a file.. But ok so I have included them in my .pro like this :#------------------------------------------------- # # Project created by QtCreator 2017-04-12T20:10:01 # #------------------------------------------------- QT += core gui network greaterThan(QT_MAJOR_VERSION, 4): QT += widgets TARGET = ihm2 TEMPLATE = app # The following define makes your compiler emit warnings if you use # any feature of Qt which as been marked as deprecated (the exact warnings # depend on your compiler). Please consult the documentation of the # deprecated API in order to know how to port your code away from it. DEFINES += QT_DEPRECATED_WARNINGS # You can also make your code fail to compile if you use deprecated APIs. # In order to do so, uncomment the following line. # You can also select to disable deprecated APIs only up to a certain version of Qt. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += main.cpp\ mainwindow.cpp \ playbutton.cpp \ audioprogressbar.cpp \ volumecontroller.cpp \ client.cpp HEADERS += mainwindow.h \ playbutton.h \ audioprogressbar.h \ volumecontroller.h \ client.h \ ../constantes.h FORMS += mainwindow.ui RESOURCES += \ images.qrc CONFIG += c++11 LIBS += -lz LIBS += -ldrm LIBS += -lboost_system unix: LIBS += -L$$PWD/../lib/ -ltag INCLUDEPATH += $$PWD/../include DEPENDPATH += $$PWD/../include unix: PRE_TARGETDEPS += $$PWD/../lib/libtag.a unix: LIBS += -L$$PWD/../lib/ -ltag_c INCLUDEPATH += $$PWD/../include DEPENDPATH += $$PWD/../include unix: PRE_TARGETDEPS += $$PWD/../lib/libtag_c.a
And now unfortenuately I get this message error :
15:36:05: Running steps for project ihm2_client... 15:36:05: Configuration unchanged, skipping qmake step. 15:36:05: Starting: "/usr/bin/make" /home/shamery/Qt/5.8/gcc_64/bin/qmake -o Makefile ../Client/ihm2_client.pro -spec linux-g++ g++ -Wl,-O1 -Wl,-rpath,/home/shamery/Qt/5.8/gcc_64/lib -o ihm2 main.o mainwindow.o playbutton.o audioprogressbar.o volumecontroller.o client.o qrc_images.o moc_mainwindow.o moc_playbutton.o moc_audioprogressbar.o moc_volumecontroller.o moc_client.o -lz -ldrm -L/home/shamery/git_ihm/Client/../lib/ -ltag -L/home/shamery/Qt/5.8/gcc_64/lib -lQt5Widgets -lQt5Gui -lQt5Network -lQt5Core -lGL -lpthread /usr/bin/ld: /home/shamery/git_ihm/Client/../lib//libtag.a(tzlib.cpp.o): référence au symbole non défini «inflate» /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libz.so: error adding symbols: DSO missing from command line Makefile:263 : la recette pour la cible « ihm2 » a échouée collect2: error: ld returned 1 exit status make: *** [ihm2] Erreur 1 15:36:05: The process "/usr/bin/make" exited with code 2. Error while building/deploying project ihm2_client (kit: Desktop Qt 5.8.0 GCC 64bit) When executing step "Make" 15:36:05: Elapsed time: 00:00.
Hope you will see the image this time.
I guess in this line
/usr/bin/ld: /home/shamery/git_ihm/Client/../lib//libtag.a(tzlib.cpp.o): référence au symbole non défini «inflate»
I see // but I don't know where I should correct that...
-
My colleague has found a solution, I guess this is because of the libtag.a wich was not good
-
@Shamzic
what was the solution ?
It seems it says that
tzlib.cpp has No inflate function so maybe the zlib is not expected version? -
@mrjj said in Libtag on windows, no rule to make target ?:
It seems it says that
tzlib.cpp has No inflate function so maybe the zlib is not expected version?I have just copied his code and his librarie and it worked...
#------------------------------------------------- # # Project created by QtCreator 2017-04-12T20:10:01 # #------------------------------------------------- QT += core gui network greaterThan(QT_MAJOR_VERSION, 4): QT += widgets TARGET = ihm2 TEMPLATE = app # The following define makes your compiler emit warnings if you use # any feature of Qt which as been marked as deprecated (the exact warnings # depend on your compiler). Please consult the documentation of the # deprecated API in order to know how to port your code away from it. DEFINES += QT_DEPRECATED_WARNINGS # You can also make your code fail to compile if you use deprecated APIs. # In order to do so, uncomment the following line. # You can also select to disable deprecated APIs only up to a certain version of Qt. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += main.cpp\ mainwindow.cpp \ playbutton.cpp \ audioprogressbar.cpp \ volumecontroller.cpp \ client.cpp HEADERS += mainwindow.h \ playbutton.h \ audioprogressbar.h \ volumecontroller.h \ client.h \ ../constantes.h FORMS += mainwindow.ui RESOURCES += \ images.qrc CONFIG += c++11 LIBS += -ldrm unix|win32: LIBS += -L$$PWD/../lib/ -ltag INCLUDEPATH += $$PWD/../include DEPENDPATH += $$PWD/../include win32:!win32-g++: PRE_TARGETDEPS += $$PWD/../lib/tag.lib else:unix|win32-g++: PRE_TARGETDEPS += $$PWD/../lib/libtag.a
-
@Shamzic
ok so maybe he used other zlib to build it :) -
@mrjj He used CMAKE like this :
cmake -DCMAKE_INSTALL_PREFIX=/home/<username>/Documents/project -DCMAKE_BUILD_TYPE=Release .
-
@Shamzic
ok, but you also copied some binary files from his pc to make it work ?
Or was using cmake enough ? -
I have just copied his directory "lib" and "include" he did with command just above and the .pro file.. And that's it !
I'm so angry to got all of theses problems and then my colleague try and it works in 30 minutes... :o -
@Shamzic
Well if he tried it before, its much easier.
So i think he used other zlib to avoid the error.
or something. -
As for your compiler question, on Windows, yes it's very important. You can't mix and match C++ libraries built with different compilers. The only current exception being VS2017 which is compatible with VS2015.