Qt build failing because of 'undefined references'. #138731
Replies: 1 comment
-
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Question
Body
Hi People,
I'm trying to get my hands on with Github Actions and created a workflow to build a simple Qt based app on Windows and Qt Creator. In my local, I have a setup of Qt 5.11.3 and mingw53_32 working good. So I tried the same in the workflow. But, while building mingw -> g++ is not able to pick up libraries somehow and gives a lot of 'undefined reference' errors some of which I listed below. It also gives 'redeclared without dllimport attribute: previous dllimport ignored' warnings while compiling:
../../../Qt/5.11.3/mingw53_32/include/QtCore/qregexp.h:115:31: warning: 'uint qHash(const QRegExp&, uint)' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
115 | friend Q_CORE_EXPORT uint qHash(const QRegExp &key, uint seed) Q_DECL_NOTHROW;
| ^~~~~
------------------------------------------
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:\a\OBJViewer\OBJViewer\OBJViewer\build/../main.cpp:22: undefined reference to
__imp__ZN5QFile4openE6QFlagsIN9QIODevice12OpenModeFlagEE' C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:\a\OBJViewer\OBJViewer\OBJViewer\build/../main.cpp:25: undefined reference to
__imp__ZN11QTextStreamC1EP9QIODevice'C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:\a\OBJViewer\OBJViewer\OBJViewer\build/../main.cpp:28: undefined reference to `__imp__ZN11QTextStream8readLineEx'
The code is available publicly at https://github.com/yourchandrashekhar/OBJViewer
I have tried so many ways to overcome it, but nothing is working out.
Here is the workflow YML:
Thanks in advance.
Chandra.
Beta Was this translation helpful? Give feedback.
All reactions