Menu

SphinxBase Compilation Error (Windows)

Help
2009-04-14
2012-09-22
  • StretchTiberius

    StretchTiberius - 2009-04-14

    I am trying to compile SphinxBase which I grabbed from the repository. I am running Windows Vista and am using Visual Studio 2008. I get the following errors:

    sbthread.c
    ../../include\err.h(65) : fatal error C1083: Cannot open include file: 'errno.h': No such file or directory
    rec_win32.c
    C:\Program Files\Windows Mobile 5.0 SDK R2\PocketPC\include\ARMV4I\winnt.h(2976) : error C2061: syntax error : identifier 'PCONTEXT'
    C:\Program Files\Windows Mobile 5.0 SDK R2\PocketPC\include\ARMV4I\winnt.h(2977) : error C2059: syntax error : '}'
    C:\Program Files\Windows Mobile 5.0 SDK R2\PocketPC\include\ARMV4I\winbase.h(1414) : error C2061: syntax error : identifier 'LPCONTEXT'
    C:\Program Files\Windows Mobile 5.0 SDK R2\PocketPC\include\ARMV4I\winbase.h(1414) : error C2059: syntax error : ';'
    C:\Program Files\Windows Mobile 5.0 SDK R2\PocketPC\include\ARMV4I\winbase.h(2117) : error C2146: syntax error : missing ')' before identifier 'lpContext'
    C:\Program Files\Windows Mobile 5.0 SDK R2\PocketPC\include\ARMV4I\winbase.h(2117) : error C2081: 'LPCONTEXT' : name in formal parameter list illegal
    C:\Program Files\Windows Mobile 5.0 SDK R2\PocketPC\include\ARMV4I\winbase.h(2117) : error C2061: syntax error : identifier 'lpContext'
    C:\Program Files\Windows Mobile 5.0 SDK R2\PocketPC\include\ARMV4I\winbase.h(2117) : error C2059: syntax error : ';'
    C:\Program Files\Windows Mobile 5.0 SDK R2\PocketPC\include\ARMV4I\winbase.h(2118) : error C2059: syntax error : ')'
    C:\Program Files\Windows Mobile 5.0 SDK R2\PocketPC\include\ARMV4I\winbase.h(2125) : error C2143: syntax error : missing ')' before ''
    C:\Program Files\Windows Mobile 5.0 SDK R2\PocketPC\include\ARMV4I\winbase.h(2125) : error C2143: syntax error : missing '{' before '
    '
    C:\Program Files\Windows Mobile 5.0 SDK R2\PocketPC\include\ARMV4I\winbase.h(2126) : error C2059: syntax error : ')'

    Any ideas on how to fix this? Why is it using Windows Mobile header files?

     
    • TTux

      TTux - 2009-04-26

      I'm getting the same errors even with release version of sphinxbase (sphinxbase-0.4.1.tar.bz2).

       
    • TTux

      TTux - 2009-04-26

      Now I'm confused, in the release version of sphinxbase solution, there are 4 versions for each of the 3 projects:
      1) sphinx_cepview (Win32|Windows Mobile) (Debug, Release)
      2) sphinx_fe (Win32|Windows Mobile) (Debug, Release)
      3) sphinxbase (Win32|Windows Mobile) (Debug, Release)

      For some reason, the "sphinx_jsgf2fsg" shows unavailable in visual studio.

      If I compile for Win32 platform, the release versions compile all right with Visual Studio 2008.

      But if I compile for Windows Mobile platform, they fail to get compiled.

      I want to use sphinxbase and pocketsphinx on Windows Mobile smartphones.

      What's even more confusing is that in the last release of pocketsphinx, under "batch build" I don't see any targets for platform Windows Mobile. They are all only for Win32 and they compile fine.

      So, now my question is can I compile for Win32 platform and use the compiled libraries and executables on Windows Mobile???

      Is that how it is supposed to work? Again, kindly excuse me for sounding naive. I'm very new to Sphinx and Windows development environment. I'm a linux guy so getting quite confused with Visual Studio here. I was hoping that the release versions will just compile out of the box for Windows Mobile platforms as the .sln files do contain build configurations for Windows Mobile.

      Is this not the case?

      Thanks and best regards,
      Kapil Pendse

       
    • StretchTiberius

      StretchTiberius - 2009-04-16

      Ok, I figured out that if I can unselect all the Windows Mobile build options from the "Batch Build" window. I may be helpful to make a note in the Tutorial to select all the projects for you platform instead of just saying "Build All."

       
    • TTux

      TTux - 2009-04-26

      Hello,

      I'm using Windows XP and Visual Studio 2008. I got the same errors as you when I tried to batch build all the projects in the sphinxbase.sln.

      My problem is, I want to build for pocket PC, so I want to build sphinxbase and pocketsphinx for Windows Mobile target.

      So my question is, shouldn't _WIN32_WCE be defined automatically by the compiler/toolchain for the Windows Mobile target?

      If it is defined, then the following code in err.h would not attempt to include errno.h...

      ifndef _WIN32_WCE

      include <errno.h>

      endif

      Am I missing something? How do I compile sphinxbase and pocketsphinx for the Windows Mobile/PocketPC targets?

      Thanks and best regards,
      Kapil Pendse

       
      • Nickolay V. Shmyrev

        Hm, errno.h is more or less standard header that should present in any C platform. I wonder why it's missing in VisualStudio

         
        • TTux

          TTux - 2009-04-26

          Well, errno.h seems to be present for Windows XP under:

          "Program Files\Microsoft Visual Studio 9.0\VC\include"

          But while googling around, I found that instead of errno.h, there are some error tracking functions available in winbase.h for the Windows Mobile environment at:

          "Program Files\Microsoft Visual Studio 9.0\SmartDevices\SDK\PocketPC2003\Include"

          Is this a problem only with Visual Studio 2008 or also with Visual Studio 2005? How are others compiling sphinxbase and pocketsphinx for Windows Mobile targets? I got these errors at the first attempt when I tried to compile for Windows Mobile target, so I'm hoping there would be a well-known solution for this problem... Unless I'm missing something really basic.

          Kindly help me out.

          Best regards,
          Kapil Pendse

           

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.