C++ :: Error Linking VOCE Library In QT?
Jan 17, 2014
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 FilesJavajdk1.7.0_45lib 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>,
[Code] ......
This is my .pro content:
Code:
QT + = core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = ProjectX
TEMPLATE = app
[Code] .....
How can I get rid of this error? I am using QT, the latest version which use the Visual c++ 2010 compiler.
View 1 Replies
ADVERTISEMENT
Feb 16, 2012
I am trying to build an application that has one static library dependency, however I am getting this error when linking:
1>ClCompile:
1> All outputs are up-to-date.
1>LINK : fatal error LNK1104: cannot open file 'TestWrapperLib.obj'
Why I might be getting that? I have the .lib in the depends line, and the directory where it is at in the include line.
View 1 Replies
View Related
Oct 7, 2014
I am trying to refresh my memory here as I did some studies many years ago but the results elude me.Also todays c/c++ compilers may have better optimizations.Say I have a static library that includes three obj modules.Each of these object modules has a number of functions. These functions do not reference any other functions within the obj module.My main app links this library but only references one function from each of the object modules.
Question: Are the complete contents of each module linked into my main app or are todays linkers smart enough to just link the functions used?
View 4 Replies
View Related
Jun 20, 2013
I have a libcx3d.a which contains my VrmlParser class and other classes which are used by VrmlParser. I have a main.cpp which does this :
VrmlParser vp = new VrmlParser();
double **VOB = vp.getVOB();
When I compile using g++ main.cpp -o main -L. -lcx3d, I get the following errors :
'VrmlParser' was not declared in this scope.
expected ';' before vp.
'vp' was not declared in this scope.
There is a header file called "VrmlParser.h" in the static library. Should I include this header file in main.cpp ? If so, will include "VrmlParser.h" work ? I have the .a and .cpp in the same directory. I can't find the header file for the static library.
View 9 Replies
View Related
Jul 16, 2014
I have built a static library that contains a macro. From a separate exe, I am calling this macro, but it doesn't work.
The compilation of the static library and that of the exe went okay.
Static lib contains just the macro definition.
Exe contains call to this macro.
Is there anything else that I need to do for this to work?
View 4 Replies
View Related
Dec 17, 2014
I have written a program that uses boost in visual studio 2012. The only boost library I used is filesystem by doing.
1)Properties->Linker->General and adding the path or the .lib to the additional dependencies. The libraries, link at compile time.However when i move the exe to a different computer, it doesn't work. Therefore the libraries were dynamically not statically linked. So my question is how do I statically link the filesystem library, so that i can include boost/filesystem.hpp in visual studio 2012?
View 1 Replies
View Related
Mar 11, 2013
I am running ubuntu and have tried adding -1GL to the end of my gcc compiling commands but the error says "unrecognized commandline option: 1GL". do i have to install any packages to get this to work?
Its supposed to be an l not a 1.
View 1 Replies
View Related
Jan 14, 2013
I am trying to add in a few 3rd party libraries to an existing project solution. I have no source code or knowledge on how the libraries were built (i.e. what run-time library was used). I have recieved the following errors and warnings:
1>CAPS_LIB.lib(PCEfunc.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
1>libcmt.lib(getenv.obj) : error LNK2005: _getenv_s already defined in MSVCRT.lib(MSVCR90.dll) ***There are multiple of these errors
1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>MSVCRT.lib(cinitexe.obj) : warning LNK4098: defaultlib 'libcmt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
1>libcmt.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
1>C:Program Files (x86)BCI 2000 v3progRelWithDebInfo..CAPSVRInterface.exe : fatal error LNK1120: 1 unresolved externals
CAPS_LIB.lib is one of the libraries I am trying to add in and it seems to be the one causing the problem. I believe I have added in all three libraries into the project solution correctly, but I can't seem to find a solution to these errors.
View 2 Replies
View Related
Aug 6, 2013
I want to write a game engine with MinGW and Code::blocks ide
[URL] ....
This is my project's source code
[URL] .....
This is the build log.
I can't code it here, because it's two large to add the characters!
View 10 Replies
View Related
Feb 13, 2013
My goal is accessing c++ objects within c by using wrapper and externals. To get the pointer to the c++ object I use a type "void *".
But i get an error while linking: undefined reference to "create_mycpp".
Should I take an other way to access c++ objects?
Code:
//-------------------------------------
//mycpp.cpp
#include "mycpp.h"
Mycpp::void func(int i)
{
i += 1;
[Code] ....
View 7 Replies
View Related
Jan 6, 2013
So here is the program:
//Program to convert from Fahrenheit to Celcius
#include <iostream>
double fahrenToCelsius (double t);
//precondition:
//t is a valid tempreture in Fahrenheit
//postcondition:
//returns equivalent temp. in Celcius
[Code] .....
And here is the problem:
[Linker error] C:UsersOwnerAppDataLocalTempcckex8SZ.o:fahrenToCelsius.cpp: (.text+0x3d): undefined reference to `fahrenToCelsius(double)'
collect2: ld returned 1 exit status
I'm suspecting the program maybe that I saved it wrong? I saved it as fahrentoCelsius.cpp inside the folder "Work" ( I created this folder) which is inside the folder "Dev-cpp".
View 1 Replies
View Related
Dec 28, 2013
All day long I tried figuring out how to setup VOCE [URL] ....
I am using VS 2010.
What I did:
* Downloaded JDK
* Downloaded the VOCE, extracted and put in c:
* Opened VS and in properties->Vc++ Direcotories:
* In Include Directories i added: C:voce-0.9.1srcc++, C:Program * FilesJavajdk1.7.0_45include, C:Program FilesJavajdk1.7.0_45includewin32
* In Library Directories i added: C:voce-0.9.1lib, C:Program * FilesJavajdk1.7.0_45lib
ALSO: I didn't get what i suppose to do with C:voce-0.9.1lib everything there * is winrars
Tried to compile a sample file and it gives me the error:
Testing.obj : error LNK2001: unresolved external symbol _imp_JNI_CreateJavaVM@12
View 14 Replies
View Related
Jan 14, 2014
I downloaded Oracle instantclient-basic-nt-12.1.0.1.0.zip and instantclient-sdk-nt-12.1.0.1.0.zip and extracted both to c:oracle I then went into visual studio 2013 and created a Win32 Console application with all default parms.
I then went into project -> properties -> C/C++ -> General -> Additional Include Directories and added my include path C:oraclesdkinclude
I then went into project -> properties -> Linker -> General -> Additional Library Directories and added C:oraclesdklibmsvcvc11
I then went into project -> properties -> Linker -> Input -> Additional Dependancies and added oraocci12.lib
The program compiles but when I debug i get a RUNTIME error that says "The program can't start because oraocci12.dll is missing from your computer. Try reinstalling the program to fix this problem. But I know the file exists in C:oraclesdklibmsvcvc11oraocci12.lib
This is the code if it makes a difference
Code:
#include "stdafx.h"
#include <iostream>
#include <occi.h>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
[Code].....
View 8 Replies
View Related
Jun 28, 2014
I have been trying to get the libcurl library to work with the following program shown below but I have been getting the following error:
||=== Build: Debug in test3 (compiler: GNU GCC Compiler) ===|
objDebugmain.o||In function `Z8getstockPcS_':|
undefined reference to `_imp__curl_global_init'|
undefined reference to `_imp__curl_easy_init'|
undefined reference to `_imp__curl_easy_setopt'|
undefined reference to `_imp__curl_easy_setopt'|
undefined reference to `_imp__curl_easy_setopt'|
undefined reference to `_imp__curl_easy_setopt'|
undefined reference to `_imp__curl_easy_setopt'|
undefined reference to `_imp__curl_easy_perform'|
undefined reference to `_imp__curl_easy_cleanup'|
undefined reference to `_imp__curl_global_cleanup'|
||=== Build failed: 10 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|
I'm using Windows 7 64bit and Code::Blocks. Under 'build options' linker settings and link libraries I added all the libraries listed in the lib64 folder namely, libcrypto.a, libcrypto.dll.a, libcurl.a, libcurldll.a, librtmp.a, libssh2.a, libssh2dll.a, libssl.a, libssl.dll.a, libz.a, libz.dll.a, and libzdll.a. Under search directories compiler I included c:libcurl-7.34.0-devel-mingw64include and under search directories linker I included c:libcurl-7.34.0-devel-mingw64lib64.
#include <stdio.h>
#include <curl/curl.h>
#include <string>
#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#include <ctime>
[code].....
View 2 Replies
View Related
Jul 30, 2012
Okay so I'm writing a simple program - so far with just 1 header and 1 .cpp file to go with it. I'm getting strange errors saying that my struct hasn't been recognised even though I declare it in the header. The code involved is --
Code:
#include<stdio.h>
#include<iostream>
#include<sstream>
#include"bots.h"
//#include"prisonersDilemna.h"
//write program to battle multiple bots with a random choice generator
//and after all iterations post who comes out on top.
[Code] ....
||=== Build finished: 6 errors, 0 warnings ===|
How should the syntax be? Why does my program not recognise bot as an object type? Why can I not have a void method?
View 5 Replies
View Related
Nov 19, 2013
So I made a library for a whole bunch of functions and when i compile it, it says"Unresolved external symbol_(Name of function here) referenced in function main.
View 1 Replies
View Related
Mar 19, 2014
I am trying to compile a program with the graphics.h library included but I always get this error:Id returned 1 exit status.
View 1 Replies
View Related
Dec 20, 2012
I am debugging a library. I can step into the code however the watch window doesn't show the values of any variables. It will display a message in the value field:
Code:
m_pParentCXX0017: Error: symbol "m_pParent" not found
Interestingly it does show values for local variables in that function but not member functions. Most of my data members are member function though that I want to debug. I am using VS2010.
View 3 Replies
View Related
Jan 17, 2014
I've been reading about libraries; How to make them, how to use them, the different types of libraries, etc..
When using a shared library, does the program require that library to be installed on the computer after the program has been compiled into an .exe?
Ie.. if somebody downloaded a "Helloworld.exe" that I had compiled on my computer using a shared library (that wasn't part of a standard operating system), would they also need that shared library on their computer for the program to run without errors?
and for Static Libraries, when I compile a program using a static library, does it include in the final binary only the functions of the library that are actually used, or does the compiler add in the entire library?
View 8 Replies
View Related
May 22, 2014
I am working on Explicit Linking of a DLL to an executable. But, when it comes to application, I have some troubles.
1) I try to export a class using C Language approach. (I would ask for other approaches later).
My dll project as follows:
dllmain.cpp
// dllmain.cpp : Defines the entry point for the DLL application.
#include "stdafx.h"
BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
[code]....
2) Related with the question above, what is the best way to provide a "pure" explicit linking? How can I explicitly link a dll without introducing the corresponding .lib and without including the dll's header file?
View 8 Replies
View Related
Mar 8, 2013
i am trying to write program that prints out full lyrics to 99 bear song. Hoping for explanation or anything
The output would have to look like:
99 bottles of beer on the wall, 99 bottles of beer.
Take one down and pass it around, 98 bottles of beer on the wall.
My try below:
Code: #include <iostream>
using namespace std;
int main()
{
for(int i=99; i>=0 ;i--)
cout << i <<""<< " bottles of beer on the wall, "<<i<<" bottles of beer."<<endl;
for(int j=98; j>=0 ;j--){
cout <<endl;
cout << "Take one down and pass it around," <<j<<" bottles of beer on the wall."<<endl;
}
return 0;
}
View 3 Replies
View Related
Feb 25, 2014
I am running a windows forms project. on the form there is a datagridview, a progress bar, a textbox and two 2 buttons.
The two buttons are used to navigate through the records(one for next record and the other for previous record) the textbox displays the record that is being currently viewed.
How can I link the progress with the database or in this case the datagridview and when the next button is pressed it increments and when the previous button is clicked it decrements and also the progress to be fully filled when the last record is reached ?
View 1 Replies
View Related
Sep 7, 2012
I am forced to have the deceleration of a class template in the .h file.
See here: [URL] ....
This works perfectly fine, as long as i #inlcude the header file only in ONE .cpp file.
The moment i #inlude it in several .cpp files, i get LNK2005 already-defined errors.
a.obj : error LNK2005: "public: unsigned int * __thiscall theclass::themthod(void)" (?xxx@theclass@@QAEPAIXZ) already defined in b.obj
I would have assumed inclusion guards can protect me from this, but wrong.
View 2 Replies
View Related
Nov 24, 2013
I am writing a contact book program in C that will run in the terminal. I am going to create a file to store the data separately, but have run into a few question areas:
1) It has occurred to me that it might be more efficient to setup the program so that it sorts the contact info by info type rather than by running through an index of the contacts and then linking all of that contact's information to that index. So basically one part of the file would be phone numbers, the other contact names, and so forth with each piece of data linked to another piece within the data file that corresponds to the same contact. Am I wrong to think this is a more efficient way to set up the file?
2)How would you link the data information to other pieces of data corresponding to the same contact in C? My thought is to do it with pointers, but I didn't know if it were possible to have the pointers as I didn't know if the pointer would point "persistently" to the data once the file closed.As I felt this is a more "in general" question, I have chosen to omit my code from this post (especially since there is not much "meat" in it to speak of).
View 6 Replies
View Related
Jan 25, 2013
My Project is to Dynamically Link 2 Software for Co-simulation n C/C++. So that Output of One Software becomes Input of Other automatically . at present we input the parameters manually in both the software . what to do so that it pick up values itself and gives the output by solving each and everything at once in both the software .
View 5 Replies
View Related
May 15, 2013
I find myself in a position where I am repeating the same pattern of, write shared lib, compile, link shared lib, write app lib "sandbox" dependent on shared lib, write shared lib, compile, link, write...
At each level of dependency I have to carry over previously shared libs, search directories, etc. How to automate this process, so I spend less time linking after each layer?
View 1 Replies
View Related