High-order harmonic generation by one- and two-electron molecular ions with intense laser pulses