0

I am trying to run the make file of the toy example given here, but it gives me the following error:

g++ -o parser parser.o codegen.o main.o tokens.o corefn.o native.o  `llvm-config
--libs` `llvm-config --ldflags` -lpthread -ldl -L/usr/bin -lz -lncurses -rdynamic

/usr/bin/ld: cannot find -lz
/usr/bin/ld: cannot find -lncurses
collect2: error: ld returned 1 exit status
Makefile:31: recipe for target 'parser' failed
make: *** [parser] Error 1

The software I am using is:

  • clang version 3.8.0-2ubuntu4 (tags/RELEASE_380/final)
  • Target: x86_64-pc-linux-gnu
  • Thread model: posix
  • InstalledDir: /usr/bin

Ubuntu is a virtual machine running on Windows 8.1.

Any comment will be appreciated.

Jongware
  • 22,200
  • 8
  • 54
  • 100
Rational Rose
  • 73
  • 1
  • 10
  • What do you think the error message is telling you? Why do you think it's failing? – Seanny123 Jan 07 '17 at 12:05
  • Your link is not working so I cannot see what's used in the original. Do you have these libraries called `z` (??) and `ncurses` installed? – Jongware Jan 07 '17 at 12:06
  • This is the link http://gnuu.org/2009/09/18/writing-your-own-toy-compiler/7/ – Rational Rose Jan 07 '17 at 12:10
  • YES it works ... Thank you so much – Rational Rose Jan 07 '17 at 12:23
  • 1
    If you found a solution: it is allowed to [post an answer to your own question](http://stackoverflow.com/help/self-answer). That could be helpful for others with the same problem. As a new user, you will have to wait a couple of days, but then you can even [accept it](http://stackoverflow.com/help/accepted-answer), which shows others that this question has an answer that helped. – Jongware Jan 07 '17 at 20:56

0 Answers0