QT Creator error: undefined reference to `#__security_check_cookie#4' - qt

This is the demo on Tencent's audio and video real-time processing. I downloaded it from the website and compiled it with QT Creator5.14.2 MinGW 32 bit. The following error occurred:
E:\Qt\qtcode\TXLiteAVSDK_TRTC_Win_latest\TRTC-API-Example-Qt\src\Util\win\zlib\x86\zlibstatic.lib(zlibstatic.dir\Release\crc32.obj):-1: error: undefined reference to `#__security_check_cookie#4'
E:\Qt\qtcode\TXLiteAVSDK_TRTC_Win_latest\TRTC-API-Example-Qt\src\Util\win\zlib\x86\zlibstatic.lib(zlibstatic.dir\Release\adler32.obj):-1: error: undefined reference to `_alldiv'
:-1: error: collect2.exe: error: ld returned 1 exit status
I searched the Demo question on the Internet, but basically used vs code instead of QT Creator+MinGW

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

QT Creator: undefined reference to 'WinMain#16'

I am building a Unit-Test using this tutorial. However, when compiling my code I get these two errors:
undefined reference to 'WinMain#16'.
collect2: ld returned 1 exit status.
why is this happening?
Did you create a main function where you create a qapplication? There's a good example here
You can also get that error when you're creating a DOS executable instead of a Windows GUI executable. It's looking for winmain() not main(),

Qt based program linked in debug mode but not in release mode

I'm writing a Qt based project using Visual Studio 2008 Compiler . In the debug mode every thing is OK and the program compiled and linked successfully but when I switch to release mode and I start to compile I get this error during linking :
1>Linking...
1>MSVCRT.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain#16 referenced in function ___tmainCRTStartup
1>release\\MobnaPC.exe : fatal error LNK1120: 1 unresolved externals
But main function has defined!
Thank you in advance

Symbian development with Qt e32std.h not found

I am trying to compile a cmake project for symbian using QtSDK (Qt 4.7).
When I build it within the Qt Creator, I get these errors:
C:/QtSDK/Symbian/SDKs/Symbian3Qt473/include/QtCore/qatomic_symbian.h:46: error: e32std.h:
No such file or directory
C:/QtSDK/Symbian/SDKs/Symbian3Qt473/include/QtCore/qatomic_symbian.h: In member
function 'bool QBasicAtomicInt::ref()':
C:/QtSDK/Symbian/SDKs/Symbian3Qt473/include/QtCore/qatomic_symbian.h:135: error: 'User'
has not been declared
C:/QtSDK/Symbian/SDKs/Symbian3Qt473/include/QtCore/qatomic_symbian.h:135: error: 'TInt' was not declared in this scope
C:/QtSDK/Symbian/SDKs/Symbian3Qt473/include/QtCore/qatomic_symbian.h:135: error: expected primary-expression before ')' token
C:/QtSDK/Symbian/SDKs/Symbian3Qt473/include/QtCore/qatomic_symbian.h: In member function 'bool QBasicAtomicInt::deref()':
C:/QtSDK/Symbian/SDKs/Symbian3Qt473/include/QtCore/qatomic_symbian.h:141: error: 'User' has not been declared
C:/QtSDK/Symbian/SDKs/Symbian3Qt473/include/QtCore/qatomic_symbian.h:141: error: 'TInt' was not declared in this scope
C:/QtSDK/Symbian/SDKs/Symbian3Qt473/include/QtCore/qatomic_symbian.h:141: error: expected primary-expression before ')' token
I have checked that e32std.h exists at C:\QtSDK\Symbian\SDKs\Symbian3Qt473\epoc32\include
But still these errors occur.
It seems to me that cmake is not able to find the correct architecture for compilation.
I am using cmake for windows.
What could be the problem ?

Resources