How to build Quazip 0.5.1 on Windows 7? - qt

I'm trying to build the quazip libary (version 0.5.1) on Windows 7 (32-bit) with Qt 5.0.1 32-Bit LGPL installed.
When i run in the Qt-Commandprompt:
qmake
mingw32-make
with the directory set to the folder in which I extracted Quazip (C:\Qt\quazip-0.5.1\quazip), I get the following error-log:
C:\Qt\quazip-0.5.1\quazip>mingw32-make
mingw32-make -f Makefile.Release
mingw32-make[1]: Entering directory 'C:/Qt/quazip-0.5.1/quazip'
g++ -Wl,-s -shared -mthreads -Wl,--out-implib,release\libquazip.a -o release\qua
zip.dll object_script.quazip.Release -LC:\Qt\Qt5\5.0.1\mingw47_32\lib -lQt5Core
./release\unzip.o:unzip.c:(.text+0x1008): undefined reference to `crc32'
./release\unzip.o:unzip.c:(.text+0x10aa): undefined reference to `inflate'
./release\unzip.o:unzip.c:(.text+0x10da): undefined reference to `crc32'
./release\unzip.o:unzip.c:(.text+0x1110): undefined reference to `crc32'
./release\unzip.o:unzip.c:(.text+0x1327): undefined reference to `inflateEnd'
./release\unzip.o:unzip.c:(.text+0x1727): undefined reference to `get_crc_table'
./release\unzip.o:unzip.c:(.text+0x186f): undefined reference to `inflateInit2_'
./release\zip.o:zip.c:(.text+0xac7): undefined reference to `crc32'
./release\zip.o:zip.c:(.text+0xb7c): undefined reference to `deflate'
./release\zip.o:zip.c:(.text+0xcdf): undefined reference to `deflate'
./release\zip.o:zip.c:(.text+0xef5): undefined reference to `deflateEnd'
./release\zip.o:zip.c:(.text+0x13a8): undefined reference to `get_crc_table'
./release\zip.o:zip.c:(.text+0x1af9): undefined reference to `deflateInit2_'
./release\quaadler32.o:quaadler32.cpp:(.text+0x2e): undefined reference to `adle
r32'
./release\quaadler32.o:quaadler32.cpp:(.text+0x61): undefined reference to `adle
r32'
./release\quaadler32.o:quaadler32.cpp:(.text+0xa1): undefined reference to `adle
r32'
./release\quaadler32.o:quaadler32.cpp:(.text+0xb1): undefined reference to `adle
r32'
c:/qt/qt5/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64
-mingw32/bin/ld.exe: ./release\quaadler32.o: bad reloc address 0x0 in section `.
rdata$_ZTI13QuaChecksum32[__ZTI13QuaChecksum32]'
collect2.exe: error: ld returned 1 exit status
Makefile.Release:106: recipe for target 'release\quazip.dll' failed
mingw32-make[1]: *** [release\quazip.dll] Error 1
mingw32-make[1]: Leaving directory 'C:/Qt/quazip-0.5.1/quazip'
makefile:34: recipe for target 'release' failed
mingw32-make: *** [release] Error 2
But in my Zlib-Folder (C:\Qt\Qt5\5.0.1\Src\qtbase\src\3rdparty\zlib) are all this listed files installed.
.
As I tried to solve the problem, I have added into the quazip.pro and into the quazip.pri:
INCLUDEPATH += $$[QT_INSTALL_PREFIX]/src/3rdparty/zlib
, how it is suggested here.
All other solutiuons I have found on Google so far aren't helping.
I hope someone of you can help me.
Greetings,
LVreg

The problem is that QuaZIP can not find the zlib library. You should include the path of the headers an also the libraries when you run qmake:
qmake "INCLUDEPATH+=C:/Qt/Qt5/5.0.1/Src/qtbase/src/3rdparty/zlib" "LIBS+=-LC:/Qt/Qt5/5.0.1/Src/qtbase/src/3rdparty/zlib -lz"
mingw32-make
There is a full explanation in my blog if you want to check it out: http://www.antonioborondo.com/2014/10/22/zipping-and-unzipping-files-with-qt/

Here is what worked for me (QuaZip 0.7 on Windows 7 compiled with MSVC13 32 bits):
In the command line type:
SET INCLUDE=<PathToZib\include>;%INCLUDE%
SET LIB=<PathToZib\lib>;%LIB%
qmake PREFIX=<FolderWhereInstallWillPutFiles> LIBS+=<PathToZib\lib>/zdll.lib
nmake
nmake install
everything between <> must be changed to your applicable path
NOTE:
in the LIBS+= part use / instead of \ as folders delimiter

try to make the lib of quazip on windows - look here:
https://www.maefloresta.com/wiki/doku.php?id=quazip_windows
but - try the following command - instead of "make" take "mingw32-make".

Related

libQt5SerialPort.so.5: undefined reference to `udev_device_get_devnode#LIBUDEV_183 when cross-building Qt-everywhere-src-5.13.1 for BeagleBone Black

I am new to using Qt (and building it).
I have searched on the web and landed at multiple ways of cross-building the Qt src for Beaglebone Black, of multiple versions, but haven't been successful to build any of those.
I am following the guide from one of the GitHub pages here.
The configure and make commands worked fine and didn't give any errors (just some warnings).
But when I tried "make install", the build continued until I was bombarded with a bunch of errors for with the 'libQt5SerialPort.so.5' and fails ultimately with 'Error 1' and 'Error 2'.
Here's the terminal log which give the undefined reference errors:
make[4]: Entering directory '/home/yash/BBB/qt-everywhere-src-5.13.1/qtserialbus/src/tools/canbusutil'
/home/yash/BBB/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -mfloat-abi=hard --sysroot=/home/yash/BBB/sysroot -Wl,-O1 -Wl,--enable-new-dtags -Wl,-z,origin -Wl,-rpath,\$ORIGIN/../lib -Wl,-rpath-link,/home/yash/BBB/qt-everywhere-src-5.13.1/qtbase/lib -Wl,-rpath-link,/home/yash/BBB/qt-everywhere-src-5.13.1/qtserialport/lib -o ../../../bin/canbusutil .obj/main.o .obj/readtask.o .obj/canbusutil.o .obj/sigtermhandler.o .obj/moc_readtask.o .obj/moc_canbusutil.o .obj/moc_sigtermhandler.o /home/yash/BBB/qt-everywhere-src-5.13.1/qtserialbus/lib/libQt5SerialBus.so /home/yash/BBB/qt-everywhere-src-5.13.1/qtbase/lib/libQt5Core.so -lpthread -lrt -lpthread -ldl
/home/yash/BBB/qt-everywhere-src-5.13.1/qtserialport/lib/libQt5SerialPort.so.5: undefined reference to `udev_list_entry_get_next#LIBUDEV_183'
/home/yash/BBB/qt-everywhere-src-5.13.1/qtserialport/lib/libQt5SerialPort.so.5: undefined reference to `udev_new#LIBUDEV_183'
/home/yash/BBB/qt-everywhere-src-5.13.1/qtserialport/lib/libQt5SerialPort.so.5: undefined reference to `udev_device_new_from_syspath#LIBUDEV_183'
/home/yash/BBB/qt-everywhere-src-5.13.1/qtserialport/lib/libQt5SerialPort.so.5: undefined reference to `udev_device_get_parent#LIBUDEV_183'
/home/yash/BBB/qt-everywhere-src-5.13.1/qtserialport/lib/libQt5SerialPort.so.5: undefined reference to `udev_enumerate_new#LIBUDEV_183'
/home/yash/BBB/qt-everywhere-src-5.13.1/qtserialport/lib/libQt5SerialPort.so.5: undefined reference to `udev_device_unref#LIBUDEV_183'
/home/yash/BBB/qt-everywhere-src-5.13.1/qtserialport/lib/libQt5SerialPort.so.5: undefined reference to `udev_enumerate_add_match_subsystem#LIBUDEV_183'
/home/yash/BBB/qt-everywhere-src-5.13.1/qtserialport/lib/libQt5SerialPort.so.5: undefined reference to `udev_enumerate_get_list_entry#LIBUDEV_183'
/home/yash/BBB/qt-everywhere-src-5.13.1/qtserialport/lib/libQt5SerialPort.so.5: undefined reference to `udev_device_get_driver#LIBUDEV_183'
/home/yash/BBB/qt-everywhere-src-5.13.1/qtserialport/lib/libQt5SerialPort.so.5: undefined reference to `udev_device_get_sysname#LIBUDEV_183'
/home/yash/BBB/qt-everywhere-src-5.13.1/qtserialport/lib/libQt5SerialPort.so.5: undefined reference to `udev_unref#LIBUDEV_183'
/home/yash/BBB/qt-everywhere-src-5.13.1/qtserialport/lib/libQt5SerialPort.so.5: undefined reference to `udev_enumerate_scan_devices#LIBUDEV_183'
/home/yash/BBB/qt-everywhere-src-5.13.1/qtserialport/lib/libQt5SerialPort.so.5: undefined reference to `udev_list_entry_get_name#LIBUDEV_183'
/home/yash/BBB/qt-everywhere-src-5.13.1/qtserialport/lib/libQt5SerialPort.so.5: undefined reference to `udev_device_get_property_value#LIBUDEV_183'
/home/yash/BBB/qt-everywhere-src-5.13.1/qtserialport/lib/libQt5SerialPort.so.5: undefined reference to `udev_enumerate_unref#LIBUDEV_183'
/home/yash/BBB/qt-everywhere-src-5.13.1/qtserialport/lib/libQt5SerialPort.so.5: undefined reference to `udev_device_get_devnode#LIBUDEV_183'
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:99: ../../../bin/canbusutil] Error 1
make[4]: Leaving directory '/home/yash/BBB/qt-everywhere-src-5.13.1/qtserialbus/src/tools/canbusutil'
make[3]: *** [Makefile:59: sub-canbusutil-install_subtargets] Error 2
make[3]: Leaving directory '/home/yash/BBB/qt-everywhere-src-5.13.1/qtserialbus/src/tools'
make[2]: *** [Makefile:112: sub-tools-install_subtargets] Error 2
make[2]: Leaving directory '/home/yash/BBB/qt-everywhere-src-5.13.1/qtserialbus/src'
make[1]: *** [Makefile:61: sub-src-install_subtargets] Error 2
make[1]: Leaving directory '/home/yash/BBB/qt-everywhere-src-5.13.1/qtserialbus'
make: *** [Makefile:178: module-qtserialbus-install_subtargets] Error 2
I have tried clean building the same multiple times, but always faced the same issue.
Can someone please help with figuring out what is going wrong here?
Thanks a ton.
I think using an updated image and the qt5 libs. available would be easier for you.
For instance, when you get the image and write it to SD Card from https://forum.beagleboard.org/t/debian-11-x-bullseye-monthly-snapshots/31280 , you can then use this command:
apt search qt5
That will allow you to search for all that is available from qt5 in the Debian Buster or Bullseye Distro(s).
Enjoy. Oh...Bullseye uses apt search while Buster uses apt-cache search.
I have been researching a bit more:
https://doc.qt.io/embedded.html
https://doc.qt.io/QtForMCUs-2.1/qtul-supported-platforms.html#other-target-boards
The idea behind cmake, make, installing on the BBB is far beyond what we can discuss on this forum. I cannot pinpoint the issue from the info. given thus far.
If and when you find time, please visit forum.beagleboard.org and they have many people that are knowledgeable on the BBB on that site.
To anyone trying to build Qt for cross-compilation for BeagleBone Black, following this guide properly would work.
PS: It should be kept in mind to download qtcreator with a version equivalent to or older than the qt-source being built.

An error occurred when the ASAP(Automated Slide Analysis Platform) software was running

With the enthusiastic help of SO netizens, I configured all the environments required for ASAP (Automated Slide Analysis Platform)
The necessary libraries including Boost, Openslide, Qt, etc. have been successfully linked, but the following error occurred
====================[ Build | ASAP | Debug ]====================================
"D:\_Jason\Clion\CLion 2021.2.2\bin\cmake\win\bin\cmake.exe" --build D:\_Jason\C++_hospital\orignal\CLion1.9\ASAP-1.9\cmake-build-debug --target ASAP -- -j 9
[ 25%] Automatic MOC and UIC for target ASAP
[ 25%] Built target ASAP_autogen
[ 50%] Linking CXX executable ASAP.exe
CMakeFiles\ASAP.dir/objects.a(main.cpp.obj): In function `main':
D:/_Jason/C++_hospital/orignal/CLion1.9/ASAP-1.9/ASAP/main.cpp:6: undefined reference to `__imp__ZN12QApplicationC1ERiPPci'
D:/_Jason/C++_hospital/orignal/CLion1.9/ASAP-1.9/ASAP/main.cpp:7: undefined reference to `__imp__ZN4ASAPC1EP7QWidget'
D:/_Jason/C++_hospital/orignal/CLion1.9/ASAP-1.9/ASAP/main.cpp:8: undefined reference to `__imp__ZN7QWidget4showEv'
D:/_Jason/C++_hospital/orignal/CLion1.9/ASAP-1.9/ASAP/main.cpp:10: undefined reference to `__imp__ZN12QApplication4execEv'
D:/_Jason/C++_hospital/orignal/CLion1.9/ASAP-1.9/ASAP/main.cpp:7: undefined reference to `__imp__ZN4ASAPD1Ev'
D:/_Jason/C++_hospital/orignal/CLion1.9/ASAP-1.9/ASAP/main.cpp:6: undefined reference to `__imp__ZN12QApplicationD1Ev'
D:/_Jason/C++_hospital/orignal/CLion1.9/ASAP-1.9/ASAP/main.cpp:7: undefined reference to `__imp__ZN4ASAPD1Ev'
D:/_Jason/C++_hospital/orignal/CLion1.9/ASAP-1.9/ASAP/main.cpp:6: undefined reference to `__imp__ZN12QApplicationD1Ev'
collect2.exe: error: ld returned 1 exit status
mingw32-make.exe[3]: *** [CMakeFiles\ASAP.dir\build.make:111: ASAP.exe] Error 1
mingw32-make.exe[2]: *** [CMakeFiles\Makefile2:163: CMakeFiles/ASAP.dir/all] Error 2
mingw32-make.exe[1]: *** [CMakeFiles\Makefile2:170: CMakeFiles/ASAP.dir/rule] Error 2
mingw32-make.exe: *** [Makefile:168: ASAP] Error 2
It can be seen from "__imp__ZN12QApplicationD1Ev" that this is a Qt problem. The solution they gave in other forums is to add the statement QT += gui widgets core to the .pro file under this project.However, there is no .pro file in the ASAP source code, so I tried to use the qmake -project command to generate the .pro file. It still doesn't work after adding QT += gui widgets core

Why are there undefined references to PPP_GetInterface, PPP_ShutdownModule, and PPP_InitializeModule

I am trying compile a pexe file using the portable native client. I am following the instructions at this page:
https://developer.chrome.com/native-client/devguide/devcycle/building
I am trying to build a pexe and link it with a static lib as shown on the page. My command line is as follows.
/home/adev/opt/nacl_sdk/pepper_37/toolchain/linux_pnacl/bin/pnacl-clang++ -o pim-pnacl.pexe pim-pnacl.o -L/home/adev/opt/nacl_sdk/pepper_37/lib/pnacl/Release -lppapi_cpp -lppapi -L../libpidec -lpidec
and I get the following errors.
/home/adev/opt/nacl_sdk/pepper_37/toolchain/linux_pnacl/sdk/lib/libppapi_stub.a: error: undefined reference to 'PPP_GetInterface'
/home/adev/opt/nacl_sdk/pepper_37/toolchain/linux_pnacl/sdk/lib/libppapi_stub.a: error: undefined reference to 'PPP_ShutdownModule'
/home/adev/opt/nacl_sdk/pepper_37/toolchain/linux_pnacl/sdk/lib/libppapi_stub.a: error: undefined reference to 'PPP_InitializeModule'
For the record, the problem was in the pim-pnacl.o it needed to be compiled with the -c flag. This is the correct way to compile a single .o file:
/home/adev/opt/nacl_sdk/pepper_37/toolchain/linux_pnacl/bin/pnacl-clang++ -o pim-pnacl.o pim-pnacl.cc -O2 -I/home/adev/opt/nacl_sdk/pepper_37/include -c
I had omitted the -c and this caused linker problems.

Unable to build utils / smsq on Asterisk 1.8

While building smsq for Asterisk 1.8 the first error I got was missing pots.h. I solved this by installing libpopt-dev sudo apt-get install libpopt-dev. Now I am getting
desktop:~/Development/asterisk/asterisk-1.8.22.0$ sudo make utils/smsq
gcc utils/smsq.c -o utils/smsq
/tmp/cc87NdXn.o: In function `main':
smsq.c:(.text+0x25fe): undefined reference to `poptHelpOptions'
smsq.c:(.text+0x2634): undefined reference to `poptGetContext'
smsq.c:(.text+0x2652): undefined reference to `poptSetOtherOptionHelp'
smsq.c:(.text+0x2661): undefined reference to `poptGetNextOpt'
smsq.c:(.text+0x2682): undefined reference to `poptStrerror'
smsq.c:(.text+0x269b): undefined reference to `poptBadOption'
smsq.c:(.text+0x294b): undefined reference to `poptPeekArg'
smsq.c:(.text+0x295e): undefined reference to `poptGetArg'
smsq.c:(.text+0x298a): undefined reference to `poptPeekArg'
smsq.c:(.text+0x299d): undefined reference to `poptGetArg'
smsq.c:(.text+0x2c9d): undefined reference to `poptPeekArg'
smsq.c:(.text+0x2cb9): undefined reference to `poptGetArg'
smsq.c:(.text+0x2da1): undefined reference to `poptPeekArg'
smsq.c:(.text+0x2dc5): undefined reference to `poptPeekArg'
smsq.c:(.text+0x2dd8): undefined reference to `poptGetArg'
collect2: ld returned 1 exit status
make: *** [utils/smsq] Error 1
I figured it out, the following steps helped.
make clean
./configure --with-bluetooth **note that bluetooth has nothing to do with this issue, I need it for chan_mobile**
sudo make
make menuconfig -> Utilities -> smsq enable it
sudo make install
cd utils **note do not use make utils/smsq, it wont work**
make smsq **its now built**
sudo cp smsq /usr/bin/asterisk/
Basically menuconfig did not have smsq enabled it hat XXX, that indicated a build issue with smsq. I guess common sense triggered that building asterisk will setup the smsq references to popt$$$$ links for ld. And enabling it before the make install also make sense.

Can't build a qt project using qtservice

I'm trying to use QtService from QtSolution in a Qt project.
I've unzipped it and run:
configure.bat -library
qmake
mingw32-make
the debug and release dll were placed inside C:\Qt\2010.03\qt\bin\
Examples were correctly built .
I added this line at the bottom of my .pro file:
include(../QtSolutions/qtservice/src/qtservice.pri)
and I was able to browse the qtservice's sources from the project source tree.
When I try to build my project I get:
Running build steps for project EMCSolutionCrawler...
Configuration unchanged, skipping QMake step.
Starting: C:/Qt/2010.03/mingw/bin/mingw32-make.exe -w
mingw32-make: Entering directory `C:/Progetti/EMCSolutionCrawler'
c:\qt\2010.03\qt\bin\qmake.exe -spec ..\..\Qt\2010.03\qt\mkspecs\win32-g++ -win32 -o Makefile EMCSolutionCrawler.pro
mingw32-make: Leaving directory `C:/Progetti/EMCSolutionCrawler'
mingw32-make: Entering directory `C:/Progetti/EMCSolutionCrawler'
C:/Qt/2010.03/mingw/bin/mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory `C:/Progetti/EMCSolutionCrawler'
g++ -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_QTSERVICE_IMPORT -DQT_DLL -DQT_SQL_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT ../QtSolutions/qtservice/src/QtService.cpp -o ../QtSolutions/qtservice/src/QtService
mingw32-make[1]: Leaving directory `C:/Progetti/EMCSolutionCrawler'
mingw32-make: Leaving directory `C:/Progetti/EMCSolutionCrawler'
In file included from ../QtSolutions/qtservice/src/QtService.cpp:47:
../QtSolutions/qtservice/src/qtservice.h:50:35: error: QtCore/QCoreApplication: No such file or directory
In file included from ../QtSolutions/qtservice/src/QtService.cpp:48:
../QtSolutions/qtservice/src/qtservice_p.h:50:30: error: QtCore/QStringList: No such file or directory
../QtSolutions/qtservice/src/QtService.cpp:51:25: error: QtCore/QTimer: No such file or directory
../QtSolutions/qtservice/src/QtService.cpp:52:26: error: QtCore/QVector: No such file or directory
../QtSolutions/qtservice/src/QtService.cpp:53:27: error: QtCore/QProcess: No such file or directory
../QtSolutions/qtservice/src/QtService.cpp:426:25: error: qtservice.moc: No such file or directory
In file included from ../QtSolutions/qtservice/src/QtService.cpp:47:
../QtSolutions/qtservice/src/qtservice.h:73: error: ISO C++ forbids declaration of 'Q_DECLARE_PRIVATE' with no type
../QtSolutions/qtservice/src/qtservice.h:74: error: expected ';' before 'public'
../QtSolutions/qtservice/src/qtservice.h:80: error: ISO C++ forbids declaration of 'QString' with no type
../QtSolutions/qtservice/src/qtservice.h:80: error: expected ',' or '...' before '&' token
../QtSolutions/qtservice/src/qtservice.h:86: error: 'QString' does not name a type
../QtSolutions/qtservice/src/qtservice.h:87: error: 'QString' does not name a type
../QtSolutions/qtservice/src/qtservice.h:88: error: 'StartupType' does not name a type
../QtSolutions/qtservice/src/qtservice.h:89: error: 'QString' does not name a type
../QtSolutions/qtservice/src/qtservice.h:91: error: ISO C++ forbids declaration of 'QString' with no type
../QtSolutions/qtservice/src/qtservice.h:91: error: expected ',' or '...' before '&' token
../QtSolutions/qtservice/src/qtservice.h:110: error: ISO C++ forbids declaration of 'Q_DECLARE_PRIVATE' with no type
../QtSolutions/qtservice/src/qtservice.h:111: error: expected ';' before 'public'
../QtSolutions/qtservice/src/qtservice.h:125: error: 'ServiceFlags' has not been declared
../QtSolutions/qtservice/src/qtservice.h:125: error: ISO C++ forbids declaration of 'Q_DECLARE_FLAGS' with no type
../QtSolutions/qtservice/src/qtservice.h:127: error: expected ';' before 'QtServiceBase'
../QtSolutions/qtservice/src/qtservice.h:130: error: 'QString' does not name a type
...
What am I missing?
Environment infomation:
Qt 4.6.3 (mingw - LGPL)
Windows XP SP3
QtService 2.6
Thank you for your time.
Just a guess: I don't see a include -IC:\Qt\2010.03\qt\include in your call of g++. So the compiler can't find the Qt Headers. I tink there is something wrong in your EMCSolutionCrawler.pro.

Resources