I am experiencing what seems to be the same problem when I try to compile two different programs. Each of them creates first a static library and then the main application linki
I had the problem of getting the wrong architecture error message. It said the following:
ld: warning: ignoring file blah/lib/blahblah.a, file was built for archive which is not the architecture being linked (i386)
lipo gives: Non-fat file: ../lib/blahblah.a is architecture: x86_64
in the makefile it said the following: ARCH_FLAG = -arch x86_64 -arch i386
I commented out the i386 part and the error disappeared. ARCH_FLAG = -arch x86_64 #-arch i386
So, I think it is possible you are getting the error for the same reason. Maybe you just need to set the architecture class to match your library.
By the way, my makefile was generated by swig, and I had not set any switches for the compiler.