How can you tell that CO2 has a dipole moment while O2, N2, and HCL does not?

O2 and N2 are diatomic molecules and no matter how they are hooked up whatever one atom has as a dipole it will be negated by the other one. CO2 is linear molecule and the O=C partial dipole is canceled by the C=O of the other half. So N2, O2, and CO2 have no dipole moment. HCl; however, does.