I am trying to use PocketSphinx in Windows mobile CE.
i try to load PocketSphinx.dll with DllImportAttribute Class
but when i try to call sphinx function. it's nothing happen
note : i can't addrefenrence PocketSphinx.dll in the solution explorer.
it says "pocketsphinx.dll could not be added"
any idea?
thanks
Franky
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
fatal error C1083: cannot open include file: 'errno.h': No such file or directory c:\Users\Sebastian\Documents\Visual Studio 2008\Projects\Test WM6\src\libsphinxbase\util\dtoa.c 234 sphinxbase
Add sphinxbase/include/wince folder to include path in project properties, it has errno.h for wince there.
error lnk2019 unresolved external symbol __imp_jsgf_grammar_free
I think you need to add #include sphinxbase/jsgf.h in jsgf.c, I've just committed this fix. Please update and let me know if it works.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm having an error when trying to compile sphinxbase with Windows Mobile 6 SDK, i have included errno from wince folder, but im getting this when building the project at the compilation of mmio.c:
I found this thread when i experienced the same errors involving syntax errors around CONTEXT and PCONTEXT.
After inspecting the code in winnt.h, I have realized the root cause of this problem: PCONTEXT does not get defined.
This happens when a required preprocessor definition is not defined for a given architecture. In VS2005 this can be accomplished by placing $(ARCHFAM) and $(ARCHFAM) in the preprocessor definitions under C++ in your project properties, or adding, for example /D "X86" and /D "X86" to the command line, replacing X86 with the architecture you're compiling for.
I encountered this problem when porting an app from Pocket PC 2003 (ARMV4) to Windows CE 5.0 (x86). I had removed the ARM definitions, but didn't add any x86 definitions.
You need to edit your project properties and include architecture.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you so much Nickolay that solved it, i put $(_ARCHFAM_); $(ARCHFAM); on the preprocessor options and the compiler didn't complain.
But now i have another problem and again i cant find the solution, when compiling play_win32.c it says:
ngram_model_arpa.obj : error LNK2001: unresolved external symbol strerror
profile.obj : error LNK2019: unresolved external symbol clock referenced in function ptmr_start
I undestarnd the strerror is defined in errno.c, so i dont understand why is not working.
I attached the VS log file, the above two errors are just examples there are a lot more associated with the same type.
Ok, if you check the sources in errno.c you can see that code is guarded by _WIN32_WCE define, you need to define it preprocessor definitions, that would solve two problems above.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you Nickolay, the compilation succeeded. But i still have some questions. Is this include missing in err.c? #include "sphinxbase/ckd_alloc.h", the identifier ckd_calloc wasnt defined so included the file.
And, should i be concerned about these warnings?:
_jsgf_scanner.l(77) : warning C4013: 'strdup' undefined; assuming extern returning int
_jsgf_scanner.l(77) : warning C4047: '=' : 'char ' differs in levels of indirection from 'int'
_jsgf_scanner.l(78) : warning C4047: '=' : 'char ' differs in levels of indirection from 'int'
_jsgf_scanner.l(80) : warning C4047: '=' : 'char ' differs in levels of indirection from 'int'
_jsgf_scanner.l(81) : warning C4047: '=' : 'char ' differs in levels of indirection from 'int'
_jsgf_scanner.l(83) : warning C4047: '=' : 'char *' differs in levels of indirection from 'int'
I understand that is from the lexer, but its the only thing that pops as a warning different from a number conversion.
Thanks for the assistance.
Last edit: jsrc1115 2014-05-15
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I am trying to use PocketSphinx in Windows mobile CE.
i try to load PocketSphinx.dll with DllImportAttribute Class
but when i try to call sphinx function. it's nothing happen
note : i can't addrefenrence PocketSphinx.dll in the solution explorer.
it says "pocketsphinx.dll could not be added"
any idea?
thanks
Franky
You need to compile DLL for WindowsCE yourself
i have already compile pocketsphinx.sln using build.
is there any way to compile dll?
when i double click the pocketsphinx.dll file.
it doesn't working
To compile DLL you need to do the following:
Before you start doing that you need to have some WINCE development experience.
Not every problem in this world is solved with doubleclick
Hello,
I'm having an issue with the compilation of DLL's for windows mobile 6.
I have already installed WM6 SDK. The steps I follow are:
I'm getting this error
Could not generate command line for the 'VCCLCompilerTool' tool
When I change to win32 platform it generates successfully
Any idea?
thanks
Sebastian
Last edit: Sebastián Alejandro Garzón 2014-05-09
Hello
We do not support project files for WM. You need to create a project based on our VS2010 project files yourself.
But Does it work with windows embedded handheld 6.5 professional??
Last edit: Sebastián Alejandro Garzón 2014-05-09
Yes, if you create project files properly it will work. Make sure you imported headers in sphinxbase/include/wince.
Hi,
Trying to compile for WM6, I got this kind of errors:
And this type of error:
I've made everything forums says about this type of error but I cant get it work
Any Idea?
Add sphinxbase/include/wince folder to include path in project properties, it has errno.h for wince there.
I think you need to add
#include sphinxbase/jsgf.hin jsgf.c, I've just committed this fix. Please update and let me know if it works.Ok, By now my project is reading errno but is showing error C2065: 'errno' : undeclared identifier, pointing to this line:
E_ERROR_SYSTEM("Unable to read complete data");
I've checked inside errno and E_ERROR_SYSTEM is not defined inside
Please make sure you include sphinxbase/src/libsphinxbase/utils/errno.c into compilation too.
Hello Nickolay,
I'm having an error when trying to compile sphinxbase with Windows Mobile 6 SDK, i have included errno from wince folder, but im getting this when building the project at the compilation of mmio.c:
C:\Program Files (x86)\Windows Mobile 6 SDK\PocketPC\include\ARMV4I\winnt.h(2978) : error C2061: syntax error : identifier 'PCONTEXT'
It is very odd, because thats part of the SDK but i have tried changing everything in the configuration with no luck.
Thank you, i will apreciate any help.
Last edit: jsrc1115 2014-05-14
Please see:
http://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/fb2c5963-84a2-4aa0-b7ed-cea82b2aaaba/errors-in-winnth-file-using-visual-c-2005-express-edition-and-mar-15-sdk
You need to edit your project properties and include architecture.
Thank you so much Nickolay that solved it, i put $(_ARCHFAM_); $(ARCHFAM); on the preprocessor options and the compiler didn't complain.
But now i have another problem and again i cant find the solution, when compiling play_win32.c it says:
\src\play_win32.c(98) : warning C4013: 'GlobalUnlock' undefined; assuming extern returning int
\src\play_win32.c(99) : warning C4013: 'GlobalFree' undefined; assuming extern returning int
\src\play_win32.c(115) : warning C4013: 'GlobalAlloc' undefined; assuming extern returning int
\src\play_win32.c(115) : error C2065: 'GMEM_MOVEABLE' : undeclared identifier
\src\play_win32.c(115) : error C2065: 'GMEM_SHARE' : undeclared identifier
I appreciate your help,
Thank you.
Last edit: jsrc1115 2014-05-14
I fixed this looking at the winbase source, it is necessary to use UNDER_CE option as well, my precompiler definitions look like this now:
$(_ARCHFAM_);$(ARCHFAM);UNDER_CE;SPHINXBASE_EXPORTS;HAVE_CONFIG_H;SPHINXDLL;_CRT_SECURE_NO_DEPRECATE
But i have a problem with the linker, it says:
coredll.lib(COREDLL.dll) : fatal error LNK1112: module machine type 'THUMB' conflicts with target machine type 'ARM'
I can't find a solution.
I appreciate your help,
Thank you.
Last edit: jsrc1115 2014-05-14
There are two ARM architectures - THUMB and ARM, you need to select one of them for your project and apply consistently.
You are right, i found that in additional options there was a default rule causing the conflict.
But this is frustrating me, now the linker gives me even more errors, my preprocessor definitions are:
UNDER_CE;WINCE;WINDOWS;$(ARCHFAM);$(_ARCHFAM);SPHINXBASE_EXPORTS;HAVE_CONFIG_H;SPHINXDLL;_CRT_SECURE_NO_DEPRECATE
And it gives me:
ngram_model_arpa.obj : error LNK2001: unresolved external symbol strerror
profile.obj : error LNK2019: unresolved external symbol clock referenced in function ptmr_start
I undestarnd the strerror is defined in errno.c, so i dont understand why is not working.
I attached the VS log file, the above two errors are just examples there are a lot more associated with the same type.
Im sorry for the insistence,
Thank you.
Ok, if you check the sources in errno.c you can see that code is guarded by _WIN32_WCE define, you need to define it preprocessor definitions, that would solve two problems above.
Thanks for the fast response, i already tried that but if i do that the compiler doesnt find errno.h.
Maybe it has something to do with this definition in err.h:
#ifndef _WIN32_WCE
#include <errno.h>
#endif
I tried setting it backwards (forcing include errno.h), and it gives me:
util\err.c(75) : error C2065: 'err_wince_cb' : undeclared identifier
Among other related errors.
Last edit: jsrc1115 2014-05-14
Yes, this is an issue, I removed this ifndef, it was a bug
Yes, this was another issue in err.c for WinCE, there was extra android ifdef, I've just fixed it in trunk. Please update.
Thanks, it did solve those errors. But the compiler is telling me that it doesnt find some identifiers:
Compiling
...
err.c
util\err.c(91) : warning C4013: 'vsnprintf' undefined; assuming extern returning int
util\err.c(124) : error C2065: 'WCHAR' : undeclared identifier
util\err.c(124) : error C2065: 'wmsg' : undeclared identifier
...
I dont know if that is an error in the configuration or something is missing in the preprocessor definitions. I attached the BuildLog.
I appreciate your help,
Thank you.
I think i found another bug, in play_win32 and rec_win32 the line #include "ckd_alloc.h", should be #include "sphinxbase/ckd_alloc.h" ?.
Fixed that, thank you. Please update
Fixed that too
Right, I fixed that too. Thank you for the report.
Thank you Nickolay, the compilation succeeded. But i still have some questions. Is this include missing in err.c? #include "sphinxbase/ckd_alloc.h", the identifier ckd_calloc wasnt defined so included the file.
And, should i be concerned about these warnings?:
_jsgf_scanner.l(77) : warning C4013: 'strdup' undefined; assuming extern returning int
_jsgf_scanner.l(77) : warning C4047: '=' : 'char ' differs in levels of indirection from 'int'
_jsgf_scanner.l(78) : warning C4047: '=' : 'char ' differs in levels of indirection from 'int'
_jsgf_scanner.l(80) : warning C4047: '=' : 'char ' differs in levels of indirection from 'int'
_jsgf_scanner.l(81) : warning C4047: '=' : 'char ' differs in levels of indirection from 'int'
_jsgf_scanner.l(83) : warning C4047: '=' : 'char *' differs in levels of indirection from 'int'
I understand that is from the lexer, but its the only thing that pops as a warning different from a number conversion.
Thanks for the assistance.
Last edit: jsrc1115 2014-05-15