Thiago Macieira: 1. I think this is a bug. When using cmake project file, it has the responsibility to deal with it automatic dependency, rather than by the user to deal with.
2. No bug for qt. How to use .prl and .pc in cmake or pro file? -----邮件原件----- 发件人: development-boun...@qt-project.org [mailto:development-boun...@qt-project.org] 代表 Thiago Macieira 发送时间: 2015年10月26日 23:32 收件人: inter...@qt-project.org 抄送: development@qt-project.org 主题: Re: [Development] Qt static compiler error 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(qregularexpres > sion.o > ):qregularexpression.cpp:(.text+0x261): undefined reference to `pcre16_exec' > ../ThirdLibary/windows_mingw_static/qt/lib/libQt5Core.a(qeventdispatch > er_win > .o):qeventdispatcher_win.cpp:(.text+0x8db): undefined reference to > `_imp__WSAAsyncSelect@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@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 _______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development _______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development