Error LNK2019 unresolved external symbol _cmd_ln_init referenced in function _main

465 views Asked by At

I am trying to run my code using the library pocketsphinx. Even though I have used the .lib files for the library it still isn't working. My code:

#include "stdafx.h"
#include <pocketsphinx.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", MODELDIR "/en-us/en-us",
        "-lm", MODELDIR "/en-us/en-us.lm.bin",
        "-dict", MODELDIR "/en-us/cmudict-en-us.dict",
        NULL);
    return 0;
}

Errors:

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

There are 0 answers