I\'m trying to code a printf clone. I\'ve built a library file called \"libftprintf.a\" but when I try to use it, I get the following error, on Mac OSX 10.8.5:
If you have fat architecture object files you must make sure that you pass the s flag to ar. Without it the linker will refuse to take archive files that contain fat architecture .o files. For example:
$ ar rcs libprintf.a *.o
You should then see a warning about creating a 'fat archive'. Don't worry about this, it means that ar won't be able to update the archive file, but the linker will be able to use it to link properly.