Wrong architecture being linked with dylib on OSX?
Solved!Posted in General by Oliver Baum Sat Sep 02 2017 20:22:34 GMT+0000 (Coordinated Universal Time)·6·Viewed 2,735 times
When running the hello world from the Getting started with OSX guide, I get the following error message:
ignoring file /Users/ollie/Projects/Xcode/iSknApiTest/libISKN_API.dylib, file was built for unsupported file format ( 0x6C 0x69 0x6E 0x6B 0x20 0x6C 0x69 0x62 0x49 0x53 0x4B 0x4E 0x5F 0x41 0x50 0x49 ) which is not the architecture being linked (x86_64): /Users/ollie/Projects/Xcode/iSknApiTest/libISKN_API.dylib
What am I doing wrong here?
Hi,
Can you tell which version of OSX and XCode you use?
Thanks!
Steven for the iskn team.
Yeah, sure.
I'm running OSX Sierra 10.12.6 and Xcode Version 8.0 (8A218a).
Thank you.
It look like you are trying to build a 32bits (x86) software with our 64bits API.
We are only compatible with 64bits programs.
Did you add some specifics compiler flags? Like "-m64"?
You can look this link, I think it describe the same problem : https://stackoverflow.com/questions/10183053/file-was-built-for-unsupported-file-format-which-is-not-the-architecture-being-l
Steven for the iskn team
I wasn't using the command line to do anything at all. I was just following the instructions exactly as they are in the 'Getting started with OSX guide'.
I used the dylib file under the x64_MACOS_Clang folder.
How would I go about making sure I am building a 64bits program instead of a 32 bits one.
You can take a look here :
https://developer.apple.com/library/content/documentation/Darwin/Conceptual/64bitPorting/building/building.html
Currently I have no idea why Xcode would not compile for 64bits.
marked this as solved