我正在使用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