PDA

View Full Version : Qt Designer Error building Qt Designer plugin [SOLVED]



AlekseyK
11th March 2016, 12:04
Created custom plugin in Qt Creator (on Windows 7) by New File or Project -> Other Project -> Qt Custom Designer Widget. Trying to build it, get error:


LINK : fatal error LNK1181: cannot open input file 'widgetbox.lib'
Generated .pro file by Qt Creator is following:


CONFIG += plugin debug_and_release
TARGET = $$qtLibraryTarget(WidgetBoxPlugin)
TEMPLATE = lib

HEADERS = widgetboxplugin.h
SOURCES = widgetboxplugin.cpp
RESOURCES = icons.qrc
LIBS += -L. -lwidgetbox

greaterThan(QT_MAJOR_VERSION, 4) {
QT += designer
} else {
CONFIG += designer
}

target.path = $$[QT_INSTALL_PLUGINS]/designer
INSTALLS += target
Linker output:

link /NOLOGO /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO /DLL /SUBSYSTEM:WINDOWS /OUT:release\WidgetBoxPlugin.dll @C:\Users\Aleksey\AppData\Local\Temp\nm431E.tmp
LINK : fatal error LNK1181: cannot open input file 'widgetbox.lib'
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\link.EXE"' : return code '0x49d'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
12:43:57: The process "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\nmake.exe" exited with code 2.
Error while building/deploying project WidgetBox (kit: Desktop Qt 5.5.1 MSVC2013 32bit)
When executing step "Make"

Compiler is VS C++ 2013. Qt 5.5 installed from http://download.qt.io/official_releases/online_installers/qt-unified-windows-x86-online.exe for VS 2013 32 and 64 bit versions. What the problem could be? BTW, will it installs plugin automatically after successful build with such .pro?

P.S. Wrong linker option, just need to remove:

-lwidgetbox

anda_skoa
11th March 2016, 12:13
Well, is there a widgetbox.lib in the current directory? Is it readable? Is it a library?

Cheers,
_

AlekseyK
11th March 2016, 13:44
Read P.S., solved, thanks.