テキストのサンプルコードをその通り実行してみたんですが、下記のエラーが出て動きません。
bash
1sample1.l:9:1: warning: return type defaults to 'int' [-Wimplicit-int] 2 while(yylex()!=0){ 3 ^ 4ld: library not found for -lfl 5collect2: error: ld returned 1 exit status
これはMac固有のものなんでしょうか?
lex
1//sample1.l 2%% 3[0-9]+ {printf("Number!!\n");} 4[ \t\n]+ { /* do nothing */ } 5.+ { printf("other!!\n");} 6 7%% 8 9main(){ 10 while(yylex()!=0){ 11 } 12}
bash
1$flex sample1.l 2$gcc-5 lex.yy.c -lfl
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/04/28 04:44