First off, I'm using Windows 7 64bit, Microsoft Visual Studio 2010 and
sphinxbase / pocketsphinx 0.7
I'm trying to develop an application that needs speech recognition. I want to
wrap up specific functionality into a dll (for example, sphinxwrapper.dll),
and make that available to my application. But one of my deployment restraints
is that I need just one dll for all the speech recognition (as opposed to
sphinxbase.dll, pocketshinx.dll and sphinxwrapper.dll).
My understanding is that I can do this by compiling sphinxbase and
pocketsphinx as Static Libraries (.lib) when I use them to compile
sphinxwrapper.dll; however, I haven't been able to get that far. I can compile
sphinxbase.lib, but I can't get anything to compile after that.
Here are the steps I've taken:
Downloaded, unzipped and renamed sphinxbase and pocketsphinx 0.7
Compiled all just fine
Tried to run pocketsphinx_continuous.exe. It failed (as expected) because I didn't have sphinxbase.dll in the directory. This is the kind of thing I'm expecting to fix by compiling sphinxbase as a .lib file.
Compiled sphinxbase.lib
to do this I changed sphinxbase Project -> General -> Configuration Type from Dynamic Library (.dll) to Static Library (.lib)
Compiled just fine
Tried to unsuccessfully to compile other sphinxbase projects
For this step, all the examples will be based on compiling sphinx_lm_convert.exe, but they all have similar linking errors.
I also tried changing some of the project settings that I normally set when
linking a static library: sphinx_lm_convery project properties -> Configuration Properties ** C/C++ -> General -> Additional Include Directories added ../../include/sphinxbase just in case, as the header files seems to have been moved from \include to \include\sphinxbase between 0.6.1 and 0.7 ** Linker -> General -> Additional Library Directories ** added ../../bin/$(Configuration)
* ** Linker -> Input -> Additional Dependencies ** added sphinxbase.lib
But I got the same output when trying to compile it again.
Any thoughts on where I might be going wrong, or suggestions on what to try
next?
Thanks!**
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you want to compile everything statically, you need to redefine the macros
SPHINXBASE_EXPORT and POCKETSPHINX_EXPORT. By default they are defined in
header files as __declspec(dllexport). Header file is sphinxbase_export.h and
pocketsphinx_export.h.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
First off, I'm using Windows 7 64bit, Microsoft Visual Studio 2010 and
sphinxbase / pocketsphinx 0.7
I'm trying to develop an application that needs speech recognition. I want to
wrap up specific functionality into a dll (for example, sphinxwrapper.dll),
and make that available to my application. But one of my deployment restraints
is that I need just one dll for all the speech recognition (as opposed to
sphinxbase.dll, pocketshinx.dll and sphinxwrapper.dll).
My understanding is that I can do this by compiling sphinxbase and
pocketsphinx as Static Libraries (.lib) when I use them to compile
sphinxwrapper.dll; however, I haven't been able to get that far. I can compile
sphinxbase.lib, but I can't get anything to compile after that.
Here are the steps I've taken:
Tried to run pocketsphinx_continuous.exe. It failed (as expected) because I didn't have sphinxbase.dll in the directory. This is the kind of thing I'm expecting to fix by compiling sphinxbase as a .lib file.
Compiled sphinxbase.lib
Compiled just fine
Tried to unsuccessfully to compile other sphinxbase projects
For this step, all the examples will be based on compiling
sphinx_lm_convert.exe, but they all have similar linking errors.
With the default settings I get
I also tried changing some of the project settings that I normally set when
linking a static library:
sphinx_lm_convery project properties -> Configuration Properties
** C/C++ -> General -> Additional Include Directories added ../../include/sphinxbase just in case, as the header files seems to have been moved from \include to \include\sphinxbase between 0.6.1 and 0.7
** Linker -> General -> Additional Library Directories ** added ../../bin/$(Configuration)
* ** Linker -> Input -> Additional Dependencies ** added sphinxbase.lib
But I got the same output when trying to compile it again.
Any thoughts on where I might be going wrong, or suggestions on what to try
next?
Thanks!**
If you want to compile everything statically, you need to redefine the macros
SPHINXBASE_EXPORT and POCKETSPHINX_EXPORT. By default they are defined in
header files as __declspec(dllexport). Header file is sphinxbase_export.h and
pocketsphinx_export.h.