I am trying to compile PocketSphinx 0.4.1 along with SphinxBase 0.3 with VS2005 SP1 and the Windows Mobile 5.0 Pocket PC SDK. I have already defined POCKETSPHINX_EXPORTS, compiled the libpocketsphinx.lib and included the libpocketsphinx.lib into the pocketsphinx_batch linker input dependencies; however it raises the following errors
Error 30 error LNK2019: unresolved external symbol imp_fbs_end referenced in function WinMain batch.obj
Error 31 error LNK2019: unresolved external symbol imp_fbs_init referenced in function WinMain batch.obj
Error 32 fatal error LNK1120: 2 unresolved externals Windows Mobile 5.0 Pocket PC SDK
I have no idea why it fails, any help?? Thanks in advance!
Regards, Coriscow
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is because those symbols are defined in pocketsphinx.lib not libpocketsphinx.lib.
To link them, you may either change the POCKETSPHINX_EXPORT definition in "pocketsphinx/include/fbs.h" to avoid exporting the symbols into the dll and including them in libpocketsphinx.lib.
Or you can compile the pocketsphinx project included in the visual studio workspace and then link against the resulting pocketsphinx.lib.
Note that you must include the pocketsphinx.dll with the executables so they can run on the device.
Hope that helps.
Arnau
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hi Arnau Alemany
i am using Pocket sphinx-0.3 and sphinxbase-0.2.1,i am trying to port on WINCE-5
can u please guide me how to compile on VS2005.
thanks in advance
Regards,
vishnu
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for the reply. I do not know if it is because I am not using the nightly version, but there is no pocketsphinx.lib nor as a file neither defined in the VS' solution
Should I define any value such as POCKETSPHINX_EXPORT or any other??
Best regards,
Coriscow
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You're right, in the stable version pocketsphinx project does not appear by default in the VS solution. You have to add it manually. It can be found in pocketsphinx/win32/msdev/pocketsphinx/pocketsphinx.vcproj.
Pocketsphinx.lib is an intermediate file created when building the project. The output library is pocketsphinx.dll.
If you don't want to mess with that, you could comment the following lines in pocketsphinx/include/fbs.h:
Hi!
I am trying to compile PocketSphinx 0.4.1 along with SphinxBase 0.3 with VS2005 SP1 and the Windows Mobile 5.0 Pocket PC SDK. I have already defined POCKETSPHINX_EXPORTS, compiled the libpocketsphinx.lib and included the libpocketsphinx.lib into the pocketsphinx_batch linker input dependencies; however it raises the following errors
Error 30 error LNK2019: unresolved external symbol imp_fbs_end referenced in function WinMain batch.obj
Error 31 error LNK2019: unresolved external symbol imp_fbs_init referenced in function WinMain batch.obj
Error 32 fatal error LNK1120: 2 unresolved externals Windows Mobile 5.0 Pocket PC SDK
I have no idea why it fails, any help?? Thanks in advance!
Regards, Coriscow
Hello,
This is because those symbols are defined in pocketsphinx.lib not libpocketsphinx.lib.
To link them, you may either change the POCKETSPHINX_EXPORT definition in "pocketsphinx/include/fbs.h" to avoid exporting the symbols into the dll and including them in libpocketsphinx.lib.
Or you can compile the pocketsphinx project included in the visual studio workspace and then link against the resulting pocketsphinx.lib.
Note that you must include the pocketsphinx.dll with the executables so they can run on the device.
Hope that helps.
Arnau
hi Arnau Alemany
i am using Pocket sphinx-0.3 and sphinxbase-0.2.1,i am trying to port on WINCE-5
can u please guide me how to compile on VS2005.
thanks in advance
Regards,
vishnu
Hi Arnau,
Thanks for the reply. I do not know if it is because I am not using the nightly version, but there is no pocketsphinx.lib nor as a file neither defined in the VS' solution
Should I define any value such as POCKETSPHINX_EXPORT or any other??
Best regards,
Coriscow
Hello Coriscow,
You're right, in the stable version pocketsphinx project does not appear by default in the VS solution. You have to add it manually. It can be found in pocketsphinx/win32/msdev/pocketsphinx/pocketsphinx.vcproj.
Pocketsphinx.lib is an intermediate file created when building the project. The output library is pocketsphinx.dll.
If you don't want to mess with that, you could comment the following lines in pocketsphinx/include/fbs.h:
/ Win32/WinCE DLL gunk /
//#if (defined(_WIN32) || defined(_WIN32_WCE)) && !defined(LIBPOCKETSPHINX) && !defined(CYGWIN)
//#ifdef POCKETSPHINX_EXPORTS
//#define POCKETSPHINX_EXPORT declspec(dllexport)
//#else
//#define POCKETSPHINX_EXPORT declspec(dllimport)
//#endif
//#else / !_WIN32 /
#define POCKETSPHINX_EXPORT
//#endif
or #define LIBPOCKETSPHINX for a better solution. But i don't know how this can affect the overall compilation.
Best regards,
Arnau
Hi Arnau,
you were right, I needed to create a dynamic library instead of a static one. Now it compiles but I still have to test it. Thanks a lot!!
Best regards,
Coriscow