PDA

View Full Version : "undefined reference to 'qt_static_plugin_AccessibleFactory()'" for static Qt



pditty8811
22nd October 2015, 00:29
I get a building error for my 5.5.1 Qt static build :

"undefined reference to 'qt_static_plugin_AccessibleFactory()'"

This error has occurred for all static builds after 5.3.

Here is my process of building Static Qt:


[GOTO "D:\Qt\Qt5.5.0\5.5\Src\qtbase\mkspecs" AND FIND COMPILER NAME.
LIKE "win32-g++"

Go TO THE qmake.conf file and edit QMAKE_LFLAGS line to:
QMAKE_LFLAGS = -static -static-libgcc

GO TO QT COMMAND PROMPT:
cd "D:\Qt\Qt5.5.1.static\5.5\Src\qtbase"

THEN:
set PATH=D:\Qt\Qt5.5.1.static\Tools\mingw492_32\bin;c: \Windows;c:\Windows\System32;D:\Python33;D:\strawb erry\perl\bin;D:\Ruby200\bin

TO SHOW OPTIONS:
configure -h

THEN:
configure -static -release -platform win32-g++ -opengl desktop -opensource

THEN:
y

THEN:
mingw32-make sub-src


I have used the above process for static builds on all versions prior to 5.4 without problems.

Here is my .pro file:


QT += core gui
QT += network

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = SH3DC
TEMPLATE = app

SOURCES += main.cpp
mainwindow.cpp
populate.cpp
batch.cpp
table.cpp
grabdata.cpp
savesdata.cpp
aboutdialog.cpp
forgotdialog.cpp
settingsdialog.cpp

HEADERS += mainwindow.h
populate.h
batch.h
table.h
grabdata.h
savesdata.h
aboutdialog.h
forgotdialog.h
settingsdialog.h

FORMS += mainwindow.ui
aboutdialog.ui
forgotdialog.ui
settingsdialog.ui

RESOURCES +=
images.qrc

RC_FILE = icon.rc

TRANSLATIONS = SH3DC_de_COMP.ts

pditty8811
25th October 2015, 19:33
Does anyone have instructions for Qt static build that is version 5.4 or greater?

ChrisW67
25th October 2015, 21:23
Is that error produced when you build Qt itself, or when you build your program?

pditty8811
25th October 2015, 22:09
Is that error produced when you build Qt itself, or when you build your program?

When I build my program.

My static build of Qt steps are the same I've used always. But I'm only getting this error after v5.4.

Added after 7 minutes:

OK, so the error is specific to this project only. My other projects compile fine with static Qt post v5.4.

What could be the issue with this particular project? It's a big project, what files should I post? The .pro file is already posted in the OP.

Added after 4 minutes:

Ok, so the file in reference to in the error is the plugin_import file. It looks like this:



// This file is autogenerated by qmake. It imports static plugin classes for
// static plugins specified using QTPLUGIN and QT_PLUGIN_CLASS.<plugin> variables.
#include <QtPlugin>
Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)
Q_IMPORT_PLUGIN(QICOPlugin)
Q_IMPORT_PLUGIN(QGenericEnginePlugin)
Q_IMPORT_PLUGIN(QNativeWifiEnginePlugin)

Where is 'qt_static_plugin_AccessibleFactory()' in all of that above?