VHDL - Object "x" is used but not declared

Solution 1:

you need to add a library you can either

use ieee.numeric_std.all ; 
use ieee.std_logic_unsigned.all;