Monday, October 22, 2007

Wrong Architecture issue in Mac

I maintain a common source code base for both PPC and x86 architecture in Mac and just recompile (with different Makefiles) in both architectures. Once, I had forgotten to clean up a library archive which I had compiled in x86. So, when I tried compiling the library in PPC, I ended up with the following error.

ld: common symbols not allowed with MH_DYLIB output format with 
the -multi_module option
mymainfile.o definition of common _gsDeviceFreeMutex (size 44)
/usr/bin/libtool: internal link edit command failed


Just cleaning up the x86-compiled library archive removed the above error. And this drank few hours off my work-day. But, I ended up wiser ;-)

No comments: