Error Linking VOCE library in Qt
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Error Linking VOCE library in Qt

  1. #1
    Join Date
    Dec 2013
    Posts
    6

    Error Linking VOCE library in Qt

    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:

    Code:
    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:

    Code:
    QT       += core gui
    
    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    
    TARGET = ProjectX
    TEMPLATE = app
    
    INCLUDEPATH += D:\boost_1_55_0 \
        D:\voce-0.9.1\src\c++ \
        "D:\Program Files\Java\jdk1.7.0_45\include" \
        "D:\Program Files\Java\jdk1.7.0_45\include\win32"
    
    LIBS += -LD:\boost_1_55_0\stage\lib \
        -L"D:\Program Files\Java\jdk1.7.0_45\lib"
    How can I get rid of this error? I am using QT, the latest version which use the Visual c++ 2010 compiler.

    Please help!

  2. #2
    Join Date
    Aug 1999
    Location
    Darmstadt, FRG
    Posts
    84

    Re: Error Linking VOCE library in Qt

    See this post: http://www.qtcentre.org/threads/3914...o-a-qt-project

    By the way: Your question might be handled faster by a forum handling especially qt-stuff, like: http://www.qtforum.org/index.html or http://www.qtcentre.org/forum.php

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center