login as root, and run `rpmdrake`. This is the application used to install packages which come on the mandrake cd/dvds. When the application opens, in the search bar type 'gcc'. If you are not worried about disk space (it shouldnt be much anyway), install all of the packages which are listed, as this should cover you for any problems you may have in the future with gcc compilations.
That should sort out your problems. Any more issues, just give us a shout back here at kde-forum!
hth,
Seb