return 0;
}
// the code above is get from http://cmusphinx.sourceforge.net/wiki/tuturialp
ocketsphinx
// when i compile it,gcc gives error: expected expression before ‘/’ token
// i right install the phinx as the instruction
//when i run pkg-config --cflags --libs pocketsphinx sphinxbase (by the way
it is two "-" before cflags not one as the project illustration)
-I/usr/local/include/sphinxbase -I/usr/local/include/pocketsphinx -L/usr/local/lib -lpocketsphinx -lsphinxbase -lsphinxad /
/ my makefile/
obj=hello_ps
This doesn't work in makefile the way it works in the command line. You need
to escape the double quote otherwise it will be removed. I suggest you to try
the following makefile:
I really do as your instrucion ,but the gcc still gives errors as
below:
hello_ps.c: In function ‘main’:
hello_ps.c:10: error: ‘MODELDIR’ undeclared (first use in this
function)
hello_ps.c:10: error: (Each undeclared identifier is reported only
once
hello_ps.c:10: error: for each function it appears in.)
hello_ps.c:10: error: expected ‘)’ before string constant
make: *** Error 1
Now i am totally confused ....Thanks a lot!
Well, my instruction includes "Try to understand what really happens in a
makefile". This step will be particular useful for you.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2011-04-14
Thank you very much !!!
Just as you said,i checked the makefile ,Now it is works ok!!!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
include <pocketsphinx.h>
int
main(int argc, char argv)
{
ps_decoder_t ps;
cmd_ln_t *config;
config = cmd_ln_init(NULL, ps_args(), TRUE,
"-hmm", MODELDIR "/hmm/en_US/hub4wsj_sc_8k",
"-lm", MODELDIR "/lm/en/turtle.DMP",
"-dict", MODELDIR "/lm/en/turtle.dic",
NULL);
if (config == NULL)
return 1;
return 0;
}
// the code above is get from http://cmusphinx.sourceforge.net/wiki/tuturialp
ocketsphinx
// when i compile it,gcc gives error: expected expression before ‘/’ token
// i right install the phinx as the instruction
//when i run pkg-config --cflags --libs pocketsphinx sphinxbase (by the way
it is two "-" before cflags not one as the project illustration)
-I/usr/local/include/sphinxbase -I/usr/local/include/pocketsphinx -L/usr/local/lib -lpocketsphinx -lsphinxbase -lsphinxad /
/ my makefile/
obj=hello_ps
$(obj):$(obj).c
gcc $(obj).c -o $(obj) -DMODELDIR="
pkg-config --variable=modeldir pocketsphinx
"pkg-config --cflags --libs pocketsphinx sphinxbase
.PHONY:clean
clean:
rm -rf *.o $(obj)
HELP ME !!!!!!!!!!!!!!!!!!!!!!!!!!
This doesn't work in makefile the way it works in the command line. You need
to escape the double quote otherwise it will be removed. I suggest you to try
the following makefile:
Well, my instruction includes "Try to understand what really happens in a
makefile". This step will be particular useful for you.
Thank you very much !!!
Just as you said,i checked the makefile ,Now it is works ok!!!
can you show as what you did ?