我已經包括:'的ReadLine/readline.h' 找不到文件
#include "stdio.h"
#include <readline/readline.h>
#include <readline/history.h>
和我的編譯器包括標誌
-lreadline
,但我仍然收到錯誤消息:
fatal error: 'readline/readline.h' file not found
我想使用函數,readline();
在這裏更詳細定義:http://linux.die.net/man/3/readline
您正在使用什麼操作系統/版本? –
你的編譯器尋找包含文件的路徑是什麼? (通常,它包含'/ usr/include')。 'readline/readline.h'是否存在於該路徑中? (例如'/ usr/include/readline/readline.h')。如果不是,請通過'-I'添加正確的路徑。 (例如,如果在/ usr/local中安裝了readline,請在編譯器調用中添加'-I/usr/local/include'。 –
@TimCastelijns 2013 x86_64 x86_64 x86_64 GNU/Linux – timeshift117