This
cfg = _XT_OSC ; XT oscillator

Should be
cfg = _HS_OSC

Check this syntax