this is usually a problem with the programmer or your hardware (i.e. pic on the pcb and connection to programmer), and has nothing to do with your compiler. Make sure if you are using any of the programming pins as i/o that they do not put any load on the programmer.