我正在使用SLRE(http://slre.sourceforge.net/)在C程序中进行REGEX检查。 我包括headerfile然后我以下:使用SLRE的未定义引用lib
void checkRegex() {
struct slre slre;
struct cap captures[4+1];
if(!slre_compile(&slre, "regularexpression") {
printf("error");
}
}
我做的编写与命令:gcc example1.c -o test.cgi -L. -lconfig
和我得到这个错误:example1.c:(.text+0x1af3): undefined reference to 'slre_compile'
任何想法我做错了吗?
你确定,你的链接正确的库? – mohit 2013-04-20 09:40:37