Tag: libreadline

对’readline’的未定义引用

我在尝试运行维基百科中 提供的GNU Readline库示例代码时遇到问题。 它来了: #include #include #include #include #include int main() { char* input, shell_prompt[100]; // Configure readline to auto-complete paths when the tab key is hit. rl_bind_key(‘\t’, rl_complete); for(;;) { // Create prompt string from user name and current working directory. snprintf(shell_prompt, sizeof(shell_prompt), “%s:%s $ “, getenv(“USER”), getcwd(NULL, 1024)); // Display prompt and read […]