How to calculate mapping in bilinear
According to PBC manual, Pairing functions, map $\hat e(,)$ (without t-power) could be calculated as follows:

pairing_pp_t pp;
pairing_pp_init(pp, g1, pairing);
pairing_pp_apply(r1, gn, pp); // r1 = e(g1, gn)
pairing_pp_clear(pp);


Before calculating the map, pairing parameters must be initialized.