When you compile and link in separate steps, you must use the same -xtarget settings in the compile step and the link step.