Problem Compiling a Vhdl File

I have ha.vhdl and ha_tb.vhdl files in one of my directory and I made a makefile in which the commands goes this way

ha: ha.vhdl ha_tb.vhdl
    ghdl -a $(GHDL_ARGS) $^
    ghdl -e $(GHDL_ARGS) $@

clean:
    rm *.o *.cf

As I run ghdl -s command for ha.vhdl and ha_tb.vhdl it shows show no compilation errors.

After running the make command it goes in terminal this way:

/usr/bin/ld: cannot find -lz
collect2: error: ld returned 1 exit status
ghdl: compilation error

Can anyone please point out what am I missing ? Or someone say if there is any alternative? Thnx in advance !!!!

2
David Miller

David Miller

Executive Financial & Market Analyst

David Miller brings 15 years of experience in global economics, personal finance strategy, and market dynamics. He specializes in turning complex economic trends into actionable insights for everyday readers.

Share this article