Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Error Linking VOCE library in Qt
Guest last edited by
I am trying to use the C++ version of VOCE voice recognition API. It is an API built in Java, with support to C++ as well.
It works totally fine when I am working with VC2010. In vc2010 I have put all the necessary include files in the Vc++ Directories->Include Directories, and the library D:\Program Files\Java\jdk1.7.0_45\lib in Linker->Additional Library Directories, and i added jvm.lib in *Linker->input * And everything works great
However, whenever I am trying to execute it in Qt, I am getting the error:
@thread.obj:-1: error: LNK2019: unresolved external symbol __imp__JNI_CreateJavaVM@12 referenced in function "void __cdecl voce::init(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,bool,bool,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?init@voce@@YAXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_N100@Z)
This is my .pro content:
@QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = ProjectX
TEMPLATE = app
INCLUDEPATH += D:\boost_1_55_0
LIBS += -LD:\boost_1_55_0\stage\lib
How can I get rid of this error? I am using QT, the latest version which use the Visual c++ 2010 compiler.