Comments (5)
No problem, getting to know autotools & friends can be a bit of a hassle to most people.
The configure script is generated before release by the maintainers and included in the release tarballs. Generated files are usually not stored in version control systems, it's considered bad form.
Fellow developers learn to have all the autotools installed and run the autogen.sh script that most projects have. It creates all the files needed to build the project, including the configure script.
However, I always recommend regular users to download the latest release tarball instead.
Merry Christmas
from editline.
Thanks... after installing autoconf, automake, and libtool, I re-ran the installation steps, and did not see any error messages. However, this still gives me an error, whether I include the folder name or not:
#include <editline/readline.h>
When I run gcc -Wall file.c -o out
edit: I'm sorry, I'm going through a book called "Build your own lisp", and I missed a step: su -c "yum install libedit-dev*"
Hopefully this thread might even help someone else at some point. For those of you who are doing the exact same thing, you may need to comment-out the inclusion of readline and history so you don't get a not found error, as I did. Interestingly enough though, I do get these warnings despite the program now appearing to work as expected:
repl.c: In function ‘main’:
repl.c:15:17: warning: implicit declaration of function ‘readline’; did you mean ‘getline’? [-Wimplicit-function-declaration]
char* input = readline("lispy> ");
^~~~~~~~
getline
repl.c:15:17: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
repl.c:17:3: warning: implicit declaration of function ‘add_history’ [-Wimplicit-function-declaration]
add_history(input);
^~~~~~~~~~~
At top level:
repl.c:8:13: warning: ‘input’ defined but not used [-Wunused-variable]
static char input[2048];
^~~~~
The code:
#include <stdio.h>
#include <stdlib.h>
// #include <editline/readline.h>
// #include <editline/history.h>
static char input[2048];
int main(int arc, char** argv) {
puts("lispy version 1");
puts("ctrl+c to exit.\n");
while(1) {
char* input = readline("lispy> ");
add_history(input);
printf("no you are a %s", input);
free(input);
}
return 0;
}
from editline.
it's because you dont grok C. after building a library, you must tell your compiler where to find the library and headers, or install them into the path where the compiler looks into by default. that would typically mean ./configure --prefix=/usr
followed by make && make install
. those warnings are serious and you have to include the headers.
from editline.
@neatville I've update the example in the README.md to provide better instructions to first time users, of both GNU configure and editline.
Some other points to notice:
- You mention
#include <editline/readline.h>
above, that does not exist, only#include <editline.h>
- You also mention
su -c "yum install libedit-dev*"
, which likely installs some other version of this
library, in/usr/
unlike the defaults of this library which is/usr/local
If you want to use this library, and not libedit
as provided by yum, then follow my updated example, or see the comment by @rofl0r
I'm preparing a new release of this library soon, so please let me know if this answer was to your satisfactory, so we can close this issue.
from editline.
No activity, closing. Version 1.16.0 released today.
from editline.
Related Issues (20)
- Search with an empty string clears the whole screen HOT 2
- Pressing Ctrl+C when searching sends SIGINT after next command HOT 1
- Support for Latin-1? HOT 1
- Cannot find sgstat.h or modes.h. HOT 2
- Request for UTF-8 support HOT 16
- read() returns greater than 1 with some C standard library implementations (i.e. newlib) HOT 13
- Example Step 2 needs header file <stdio.h> HOT 1
- Inclusion in a debian repository HOT 4
- Run with mpi HOT 4
- Address sanitizer reports error HOT 12
- How to call function 'el_bind_key' HOT 3
- The process that uses editline does not respect CTRL+Z HOT 1
- Request for \1 and \2 (RL_PROMPT_START_IGNORE, RL_PROMPT_END_IGNORE) support HOT 1
- ctrl-v for verbatim input
- Prompt not redisplayed after displaying completion possibilities HOT 3
- Need to press CTRL+Z twice to have process (that consumes editline) to go in the background HOT 1
- rl_point is always zero HOT 3
- fileman.c example. Error free(): double free detected in tcache 2 HOT 1
- Can you state in the source it's licensed under Apache-2.0? HOT 3
- Does not compile cleanly HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from editline.