[Interest] [Development] Qt static compiler error

Thiago Macieira thiago.macieira at intel.com
Mon Oct 26 16:31:52 CET 2015


On Monday 26 October 2015 15:57:30 kl222 wrote:
> Hi all:
> 
> Qt statically build program is fail.
> 
> libQt5Core.a depend on libpcre16
> 
> libQt5Gui.a depend on -lopengl32, -lglu32
> 
> What do I?

You link to those libraries.

> ../ThirdLibary/windows_mingw_static/qt/lib/libQt5Core.a(qregularexpression.o
> ):qregularexpression.cpp:(.text+0x261): undefined reference to `pcre16_exec'

> ../ThirdLibary/windows_mingw_static/qt/lib/libQt5Core.a(qeventdispatcher_win
> .o):qeventdispatcher_win.cpp:(.text+0x8db): undefined reference to
> `_imp__WSAAsyncSelect at 16'

If you're doing a static link, you need to link to the indirect dependencies. 
The full library list is in the .prl and .pc files for each library. Looks 
like cmake doesn't automatically add that...

This doesn't look like a Qt bug, so please drop the development at qt-project.org 
mailing list when replying. This is a normal user error.
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Interest mailing list