How to take values from virtual interface.it is giving error loading design"Virtual interface resolution cannot find a matching instance of interface 'intf'"

i written a simple code , which includes transactor, generator, driver, interface and top module.

the generator push the values to mail box, the driver getting values from mail box. upto this is ok.
while i’m taking values from driver mailbox to virtual interface it is showing error loading design.

////////////////////////my code is////////////////////////////////////

//------------------transactor---------------------------//
class transactor;
  randc logic [3:0]a;
  logic [1:0]y;
endclass
//-----------------generator-----------------------------//
class generator;
  mailbox m1;
  transactor t1;  

     function new(mailbox m2);
       this.m1 = m2;
     endfunction
     
     task gen_task();  
        repeat(2) begin
          t1 = new();
          void'(t1.randomize());
          if( !t1.randomize()) $fatal("Gen:: trans randomization failed"); 
           m1.put(t1);
           $display($time,"This ia at generator a = %0d  y = %0b", t1.a,t1.y);
        end
     endtask
endclass

//----------------------driver--------------------------//
class driver;
  mailbox m3;
  transactor t2;
  
    virtual intf intrd;
      function new(virtual intf intr1, mailbox m4);
        this.m3 = m4;
        this.intrd = intr1;
      endfunction

      task dri_task();
         t2 = new();
         repeat(2) begin
           #1; 
           m3.get(t2);    
           intrd.a <= t2.a;
           $display($time,"This ia at driver a = %0d  y = %0b", t2.a,t2.y); 
           $display($time,"This ia at driver a = %0d  y = %0b", intrd.a,intrd.y);  
                  
         end          
      endtask
    endclass
//-----------interface-------------------//
interface intf;
    logic [3:0]a ;
    logic[1:0]y ;
endinterface
//-----------------tb-------------------//

  module main();
     generator g1;
     driver d1;
    virtual  intf intr2;
     mailbox mbx;
    encoder_42 dut(.a(intr2.a),.y(intr2.y));//////my dut calling and giving inputs
    initial begin 
       mbx = new();
       g1=new(mbx);
       d1=new(intr2,mbx);
      fork
        g1.gen_task(); 
        d1.dri_task();      
      join    
    end
endmodule

In reply to SURENDRAnalam:

A virtual interface variable (intr2) holds a handle to an actual interface instance. You need to instantiate an interface into and connect that to your your dut instance.

module main();
     generator g1;
     driver d1;
     mailbox #(transaction) mbx;
    intf intr();
    encoder_42 dut(.a(intr.a),.y(intr.y));//////my dut calling and giving inputs
    initial begin 
       mbx = new();
       g1=new(mbx);
       d1=new(intr, mbx);
      fork
        g1.gen_task(); 
        d1.dri_task();      
      join    
    end
endmodule

A couple of other notes: you call randomize twice each loop iteration. Just use the if statement. You should parameterize your mailbox with the type of class you expect to put and get through it.