Skip to content

No visible declaration error #955

Answered by nickg
cameronweston asked this question in Q&A
Discussion options

You must be logged in to vote

There's a couple of issues here. The first one is that error message is terrible. I've improved it so that it more accurately reports the problem:

** Error: name CNTR not found in package MYLIB
    > test.vhd:54
    |
 54 |   cntr_inst: entity mylib.cntr
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = Note: library MYLIB is hidden

The second issue is that use lib.pack.all shouldn't make the bare package name pack visible (use lib.pack would do that). I noticed ModelSim also has this behaviour and gives a similar error but GHDL doesn't. I checked the LRM carefully and I think GHDL is correct here so I fixed this and the example above should compile with the latest master branch.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@nickg
Comment options

Answer selected by cameronweston
@cameronweston
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants