Static Qt build Console app linking libQt5xxxxx.a error
-
I have installed static qt 5.9.1 successful with gcc.exe (x86_64-win32-sjlj-rev0, Built by MinGW-W64 project) 8.1.0 on Window 10 system
After create simple project its search for libQt5Cored.a not for libQt5Core.a..
############# staticQtConsole.pro ###########
QT += core
QT -= guiCONFIG += c++11
CONFIG -= app_bundleDEFINES += QT_DEPRECATED_WARNINGS
SOURCES += main.cpp
###################### main.cpp ##########
#include <QCoreApplication>
#include <QDebug>int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
qDebug()<<"staticQtConsole";return a.exec();
}
############# Build results #############
10:11:22: Running steps for project staticQtConsole...
10:11:22: Starting: "C:\mingw64\bin\mingw32-make.exe" clean
C:/mingw64/bin/mingw32-make -f Makefile.Debug clean
mingw32-make[1]: Entering directory 'C:/Users/System3/Documents/build-staticQtConsole-StaticQt-Debug'
rm -f debug/moc_predefs.h
rm -f debug/main.o
mingw32-make[1]: Leaving directory 'C:/Users/System3/Documents/build-staticQtConsole-StaticQt-Debug'
C:/mingw64/bin/mingw32-make -f Makefile.Release clean
mingw32-make[1]: Entering directory 'C:/Users/System3/Documents/build-staticQtConsole-StaticQt-Debug'
rm -f release/moc_predefs.h
rm -f release/main.o
mingw32-make[1]: Leaving directory 'C:/Users/System3/Documents/build-staticQtConsole-StaticQt-Debug'
10:11:26: The process "C:\mingw64\bin\mingw32-make.exe" exited normally.
10:11:26: Configuration unchanged, skipping qmake step.
10:11:26: Starting: "C:\mingw64\bin\mingw32-make.exe"
C:/mingw64/bin/mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory 'C:/Users/System3/Documents/build-staticQtConsole-StaticQt-Debug'
mingw32-make[1]: Leaving directory 'C:/Users/System3/Documents/build-staticQtConsole-StaticQt-Debug'
mingw32-make[1]: *** No rule to make target 'D:/StaticQt/Static/lib/libQt5Cored.a', needed by 'debug/staticQtConsole.exe'. Stop.
mingw32-make: *** [Makefile:36: debug] Error 2
10:11:27: The process "C:\mingw64\bin\mingw32-make.exe" exited with code 2.
Error while building/deploying project staticQtConsole (kit: StaticQt)
When executing step "Make"
10:11:27: Elapsed time: 00:05.Is there anything missing to add or modification ?
All static libs are correctly installed..
-
@anil_arise said in Static Qt build Console app linking libQt5xxxxx.a error:
After create simple project its search for libQt5Cored.a not for libQt5Core.a
Apparently you're building your project in debug mode. Try to build in release mode.
-
@anil_arise said in Static Qt build Console app linking libQt5xxxxx.a error:
I have switched from debug to edit mode
This is not what I mean!
You can build an application either in debug or release mode, has nothing to do with Edit.
So, please on the left bottom side (bellow "Projects") click on your project name and select "Release" there.
Note: without debug versions of Qt libraries (they have a trailing "d" in their names) you will not be able to build your project in debug mode to debug it.