首页| 论坛| 消息

标题:QT5+VS2013静态库使用时LINK错误unresolved external symbol _hb_buffer_create
作者:yanzhuliang
日期:2015-01-05 11:08
内容:

最近用QT5+VS2013编译了qt静态库,使用的configure如下:
configure -confirm-license -opensource -platform win32-msvc2013 -debug-and-release -static -prefix "E:\Qt\5.4.0.vs2013.lib" -qt-sql-sqlite -qt-sql-odbc -plugin-sql-sqlite -plugin-sql-odbc -qt-zlib -qt-libpng -qt-libjpeg -opengl desktop -qt-freetype -no-qml-debug -no-angle -nomake tests -nomake examples -skip qtwebkit
然后创建了一个helloword,发现LINK出错(注意:你应该在编译前将OpenGL32.lib和GLu32.lib加入到工程配置),请大神帮忙看看:
helloword源码


详细错误信息如下:
1>------ Rebuild All started: Project: helloqt5, Configuration: Debug Win32 ------
1>Moc'ing helloqt5.h...
1>Uic'ing helloqt5.ui...
1>Rcc'ing helloqt5.qrc...
1>RCC : warning : No resources in 'E:\visualstudio\helloqt5\helloqt5.qrc'.
1>
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppBuild.targets(935,5): warning MSB8027: Two or more files with the name of moc_helloqt5.cpp will produce outputs to the same location. This can lead to an incorrect build result.The files involved are GeneratedFiles\Debug\moc_helloqt5.cpp, GeneratedFiles\Release\moc_helloqt5.cpp.
1>moc_helloqt5.cpp
1>helloqt5.cpp
1>main.cpp
1>Generating Code...
1>qrc_helloqt5.cpp
1> Creating library E:\visualstudio\helloqt5\Win32\Debug\helloqt5.lib and object E:\visualstudio\helloqt5\Win32\Debug\helloqt5.exp
1>Qt5Guid.lib(qtextengine.obj) : error LNK2019: unresolved external symbol _hb_buffer_create referenced in function "private: int __thiscall QTextEngine::shapeTextWithHarfbuzzNG(struct QScriptItem const &,unsigned short const *,int,class QFontEngine *,class QVector


#1 [yanzhuliang 01-09 10:32]
仍未解决,
#2 [supperbond 02-20 17:20]
要手动加入链接库,debug版加入,qtharfbuzzngd.lib,release版加入qtharfbuzzng.lib

回复 发表
主题 版块