jovanbulck / jsh

A basic UNIX shell implementation in C
GNU General Public License v3.0
31 stars 10 forks source link

/usr/bin/ld: cannot find -lncurses #27

Closed KevinMordijck closed 10 years ago

KevinMordijck commented 10 years ago

after the update about -lncurses, my system (ubuntu 14.04) is unable to compile the code: /usr/bin/ld: cannot find -lncurses

How can I solve this?

jovanbulck commented 10 years ago

My fault, guess I included the pull request of @GijsTimmers too fast (worked on Arch ;-) ). Removing -lncurses in line 6 in the Makefile will fix the error on ubuntu 14.04 for now, but I'll have to look further for a solution working on all systems....

GijsTimmers commented 10 years ago

How about using an OR-statement? Or maybe exceptions?

Pseudocode for OR-statement:

(compilationWithNcurses() OR compilationWithoutNcurses()) AND print "All done, no errors"
## if the first one fails, try the second one

Pseudocode for exceptions:

try:
    compilationWithNcurses()
except FileNotFound:
    compilationWithoutNcurses()
print "All done, no errors"

That said, I doubt that C supports exceptions...

jovanbulck commented 10 years ago

should now work now with a very ugly hack in the Makefile...

TODO testing:

GijsTimmers commented 10 years ago

Ubuntu 14.04: ✓WORKS

jovanbulck commented 10 years ago

Done :-)

Also note make install will make a jsh binary with debug off. There's also an uninstall (make uninstall) target now

GijsTimmers commented 10 years ago

You mean make?

2014-10-17 11:59 GMT+02:00 Jo Van Bulck notifications@github.com:

Done :-)

Also note make install will make a jsh binary with debug off. There's also an uninstall target now

— Reply to this email directly or view it on GitHub https://github.com/jovanbulck/jo-shell/issues/27#issuecomment-59492208.