I’m trying to knit a package called LIBXLS into a Mac OS X program that I’m constructing and I get the following compile/link message:
ld: warning: ignoring file /Users/joeruth/Documents/cocoa applications/TestExcel/libxls-0.2.0-i386/usr/local/libxls/lib/libxlsreader.dylib,
file was built for unsupported file format ( 0xce 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 0 0x 3 0x 0 0x 0 0x 0 0x 6 0x 0 0x 0 0x 0 )
which is not the architecture being linked (x86_64):
/Users/joeruth/Documents/cocoa applications/TestExcel/libxls-0.2.0-i386/usr/local/libxls/lib/libxlsreader.dylib
What I’m hoping is that I did this totally wrong and just need to adjust how I’m linking this package into my program. My fear is that the package is simply not compatible with Xcode and Mac OS X.
I added a file that looks like this into the target ‘build phase’ ‘Link Binary with libraries’ tab of the project. What bothers me is that I linked in a file that is named libxlsreader.a as per the package documentation and the error is on the correct library name libxlsreader.dylib. This kind of tells me I did the right thing and that the compiler has looked at the file and judged it to be fubar.
Can anybody confirm that this is what the message is trying to tell me?
The error message you’re getting is indicating (rather obtusely) that the library file you’ve got is built for the
i386(32-bit Intel) architecture, notx86_64(64-bit Intel). The tipoff is the first four bytes of the file (CE FA ED FE).