使用Qt 5 + VS2013

时间:2015-06-16 20:42:16

标签: c++ qt visual-studio-2013 v8

我尝试在编译器VS2013的Qt 5.4.2中使用v8编译简单项目。我使用了来自here的hello world代码(因为来自官方文档is outdated的代码)。我使用用MD参数编译的v8引擎因为MT isn't compatible和QT。

我无法做到这一点,因为我遇到了错误。在Debug build我得到

:-1: error: LNK1104: cannot open file 'icuuc.lib'

但此lib位于其他lib的文件夹中。在Relese构建中,我得到类似的错误:

main.obj:-1: error: LNK2019: unresolved external symbol "public: static class v8::Local<class v8::Script> __cdecl v8::Script::Compile(class v8::Local<class v8::String>,class v8::ScriptOrigin *)" (?Compile@Script@v8@@SA?AV?$Local@VScript@v8@@@2@V?$Local@VString@v8@@@2@PAVScriptOrigin@2@@Z) referenced in function _main
main.obj:-1: error: LNK2019: unresolved external symbol "public: __thiscall v8::HandleScope::~HandleScope(void)" (??1HandleScope@v8@@QAE@XZ) referenced in function _main
main.obj:-1: error: LNK2019: unresolved external symbol "public: __thiscall v8::HandleScope::HandleScope(class v8::Isolate *)" (??0HandleScope@v8@@QAE@PAVIsolate@1@@Z) referenced in function _main

我的.pro文件:

TEMPLATE = app
CONFIG += console
CONFIG -= app_bundle
CONFIG -= qt

SOURCES += main.cpp

LIBS += -L"E:\(...)\v8\build\Release\lib" -lv8_base_0 -lv8_base_1 -lv8_base_2 -lv8_base_3 -licui18n -licuuc -lv8_libbase -lv8_nosnapshot -lv8_libplatform
INCLUDEPATH += E:\(...)\hello_world\
LIBS += -lWinMM -lWS2_32 -ladvapi32


include(deployment.pri)
qtcAddDeployment()

0 个答案:

没有答案