In the bindings project for PSPDFKit I use the demo version of the library for Github.
Also included in the solution is a test project that demonstrates the features of the bound library.
This works fine as long as I use the demo version of PSPDFKit. However if I use the full build, I get:
ld: could not process llvm bitcode object file, because /Applications/Xcode.app/Contents/Developer/usr/bin/../lib/libLTO.dylib could not be loaded for architecture i386
Please note that this is not an error in the bindings project but in the project that tries to use the resulting DLL.
Can somebody make sense of this error?
Answers
See here: http://forums.xamarin.com/discussion/4377/cannot-bind-api-that-uses-linktimeoptimization-can-this-be-fixed
That's pretty interesting.
So the dynamic library is only provided for x86_64, e.g.
$ file /Applications/Xcode.app//Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib /Applications/Xcode.app//Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib: Mach-O 64-bit dynamically linked shared library x86_64
OTOH
ld
is also a x86_64 process (for most copies, some are i386 and x64_64). Have you tried to use LLVM'sclang
as the compiler ? (instead of the current default GNU'sgcc
)e.g. add
--compiler=clang
to your Additional mtouch arguments@poupou No I haven't and meanwhile this "feature" has been removed again. Do you still want me to try it in order to provide feedback for you guys? If you need further info on this topic you can also directly contact [email protected]