Why Fourier series and transform of a square wave are different?
The Fourier series expansion of a square wave is indeed the sum of sines with odd-integer multiplies of the fundamental frequency. So, responding to your comment, a 1 kHz square wave doest not include a component at 999 Hz, but only odd harmonics of 1 kHz.

The Fourier transform tells us what frequency components are present in a given signal. As the signal is periodic in this case, both the Fourier series and the Fourier transform can be calculated, and they should tell us the same information. The Fourier transform of a continuous periodic square wave is composed by impulses in every harmonic contained in the Fourier series expansion. Maybe this picture from Oppenheim's Signals and Systems may help.



The actual Fourier transform are only the impulses. The dotted-line is a sinc function that doesn't apply to this question, but gives the notion that this transform has something to do with the transform of a square pulse (i.e. a not periodic signal), which happens to be a sinc.

To put it mathematically:


The Fourier series coefficients are $$\frac{\sin(k\omega_0 T)}{k\pi}$$
The Fourier transform is $$\sum\limits_{k=-\infty}^{\infty}\frac{2\sin(k\omega_0 T)}{k}\delta(\omega - k\omega_0)$$


So the series coefficients and the Fourier transform are the same, except that there is a proportionality factor of $2\pi$ and, in the first case, you plot bars (as the coefficients do not describe a function, they are just numbers), but in the second one you have impulses (because the Fourier transform is a function).