Finally I have worked out what I was doing wrong, (Hopefully this will help the next person who makes this mistake) and it was (as always) really stupid. I was trying to make using non-elf (a.out) binaries, which was causing the problem. (This probably stems from using DJGPP for two years, which has no made the transition (and probably won't)). Thanks to alls who helped me.
Peter Allen