Atmospheric drag also makes it more difficult to control the trajectory of any projectile launched, as it would subject the projectile to extremely high counter-pressures, and likely would cause severe energy losses that would be difficult to overcome.
A space gun by itself is not capable of placing objects into stable orbit around the object (planet or otherwise) from which it launches them.