Hi there,

I am programming a little application that test several cryptographic
algorithms on iPhone with Common Crypto, OpenSSL and Crypto++. So, the
application combines Objective-C, C and C++.

I compiled previously both OpenSSL and Crypto++ from source and included
them as static libraries in the application. To compile Crypto++ I used
 the script provided on https://github.com/yep/CryptoPP-for-iOS. This
script is linked from the official crypto++ wiki:
http://www.cryptopp.com/wiki/IOS. The only modification that I made on the
script was change the paths that points to the compiler and the SDK,
because Apple changed their locations. I'm using Xcode 4.3.2. and compiling
for iOS 5.1. Here are the minor changes:

export
DEV_ROOT="/Applications/Xcode.app/Contents/Developer/Platforms/${PLATFORM}.platform/Developer"
    echo "${DEV_ROOT}"
    export
TOOL_ROOT="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain"
 export SDK_ROOT="${DEV_ROOT}/SDKs/${PLATFORM}${SDK_VERSION}.sdk"
    BUILD_PATH="${WORK_PATH}/objs/${PLATFORM}${SDK_VERSION}-${ARCH}.sdk"
    echo "${SDK_ROOT}"
export CC="${DEV_ROOT}/usr/bin/llvm-gcc -arch ${ARCH}"
export LD=${DEV_ROOT}/usr/bin/ld
 export CXX=${TOOL_ROOT}/usr/bin/clang
export AR=${DEV_ROOT}/usr/bin/ar
export AS=${DEV_ROOT}/usr/bin/as
 export NM=${DEV_ROOT}/usr/bin/nm
export RANLIB=$DEV_ROOT/usr/bin/ranlib
export LDFLAGS="-arch ${ARCH} -isysroot ${SDK_ROOT}"
 export CXXFLAGS="-x c++ -arch ${ARCH} -isysroot ${SDK_ROOT}
-I${WORK_PATH}/include/${PKG_NAME} -I${BUILD_PATH}"

The script successfully compiled Crypto++ in an universal binary for all
the three architectures: i386 (emulator), and ARM 6 and ARM 7 (devices).

But although all works fine in the emulator, when I try to test the
application in the device (I use a correct Development Profile)

Gives an Apple Mach-O Linker Error with the following message:

archive member '!<arch> #1/20' with length 100644 is not mach-o or llvm
bitcode for architecture armv7

clang: error: linker command failed with exit code 1 (use -v to see
invocation)


I'm using Xcode 4.3.2. and compiling for iOS 5.1.

I am a new user of both the use of Crypto++ and the iOS platform. I tried
once and again but I can't find what produces such error. If anyone has a
lead, I need help, please.

Thanks in advance.

-- 
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.

Reply via email to