Menu

C++ compatibility

Help
2007-09-14
2012-09-22
  • Christopher Bader

    I'm working in a VS C++ environment, and to me, it's unfortunate that pocketsphinx and sphinxbase won't compile as C++ under VS. In nearly all cases, it's simply a matter of adding explicit casts. I'm more than willing to go through and make all the changes, but I'm not a committer (yet) for this project. Any ideas about how (or whether) to proceed? I'm willing to do a reasonable amount of testing.

    CB

     
    • Nickolay V. Shmyrev

      Compile it as a C project, use as an external library with

      extern "C" {
      }

       
    • David Huggins-Daines

      That said, if all it needs to compile as C++ is some explicit casts and other code cleanup, then you can submit your changes as a diff against the latest revision in the Subversion repository. Use "svn diff" (or the equivalent of this in TortoiseSVN).

       
    • David Huggins-Daines

      I'm not sure why you want or need to compile it as C++. Visual C++ will compile it as C just fine. As Nickolay said, this is what extern "C" is for. You will notice that the header files have helpfully included this for you.

      We will not use C++ in any public interfaces, ever.

       

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.