Iphone – GCC 4.2.1 darwin Avoid duplicate symbols

gcciphone

I'm building application for iPhone OS 3.0
Due to bug in GCC 4.2.1 I'm adding -all_load flag to linker, to build it on iPhone OS 3.0
But then I get
duplicate symbol _fill_fopen_filefunc in /Users/TMC2/Programming/Client/test/build/Debug-iphoneos/test.a(ioapi.o) and /Users/TMC2/Programming/Client/test/build/Debug-iphoneos/test.a(ioapi.o)

How to avoid duplicate symbols?
Andy suggestions?

Best Answer

Rerun the linker command omitting one of the libraries and see what happens. This is fairly straight forward if you pipe the build output to a file and just edit the linker statement.

Since you are building with source it is worth a try to replace one of the source files that generate ioapi.o with something containing only whitespace. Static libraries do not need to resolve their symbols until something links a loadable module from them.

Your mileage may vary on either of these.

Related Topic