Menu

cmd_ln.h file not working

Help
2017-08-28
2017-08-28
  • bunnybot5555

    bunnybot5555 - 2017-08-28

    Hi,

    When I try to run this code:

    #include "stdafx.h"
    #include <pocketsphinx.h>
    #include <sphinxbase/cmd_ln.h>
    #define MODELDIR "c:/sphinx/model"
    
    int main(int argc, char *argv[])
    {
        ps_decoder_t *ps = NULL;
        cmd_ln_t *config = NULL;
        config = cmd_ln_init(NULL, ps_args(), TRUE, "-hmm", "foodir", "-dsratio", "2", "-lm", "bar.lm", NULL);
        //config = cmd_ln_init(NULL, ps_args(), TRUE,
        //  "-hmm", MODELDIR "/en-us/en-us",
            //"-lm", MODELDIR "/en-us/en-us.lm.bin",
            //"-dict", MODELDIR "/en-us/cmudict-en-us.dict",
            //NULL);
        return 0;
    }
    

    I get these errors:

    Error   LNK2019 unresolved external symbol _cmd_ln_init referenced in function _main
    Error   LNK2019 unresolved external symbol _ps_args referenced in function _main
    

    I am positive that I linked the library files and have the right directories. So what is wrong with this?

     
    • Nickolay V. Shmyrev

      You already asked your question at https://sourceforge.net/p/cmusphinx/discussion/help/thread/20aa373d/, there is no need to ask again.

      I am positive that I linked the library files and have the right directories.

      I think it is not the case. You'd better find the local help from someone who is more experienced.

       

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.