Skip to content

Building Libraries for OF

ofTheo edited this page Apr 18, 2012 · 22 revisions

POCO

OS X:

( the following builds 32bit static poco for OS X, without mysql as that is GPL and not a default library )

export ARCHFLAGS="-arch i386"
export POCO_TARGET_OSARCH="i386"
./configure --no-tests --no-samples --static --omit=Data/MySQL
make

iPhone:

  • 1. Edit the file in build/config/iPhone

    • Uncomment out IPHONE_SDK_VERSION and set it equal to your SDK
    • Note: if you want to build for armv7 do: Set POCO_TARGET_OSARCH to be armv7
    • Close and Save the file.
  • 2. Edit the file in build/config/iPhoneSimulator

    • Change POCO_TARGET_OSARCH to i386
    • Close and Save the file.
  • 3. build Poco cd back to the main folder and run these commands:

    ./configure --no-tests --no-samples --static --omit=Data/MySQL --omit=Data/SQLite --omit=Data/ODBC --omit=NetSSL_OpenSSL --omit=Crypto --config=iPhone make

and

./configure --no-tests --no-samples --static --omit=Data/MySQL --omit=Data/SQLite --omit=Data/ODBC --omit=NetSSL_OpenSSL --omit=Crypto --config=iPhoneSimulator
make
  • **4. Use lipo make a universal lib

run the following:

cd lib
lipo -c iPhoneOS/armv6/libPocoData.a iPhoneOS/armv7/libPocoData.a iPhoneSimulator/i386/libPocoData.a -o PocoData.a
lipo -c iPhoneOS/armv6/libPocoNet.a iPhoneOS/armv7/libPocoNet.a iPhoneSimulator/i386/libPocoNet.a -o PocoNet.a
lipo -c iPhoneOS/armv6/libPocoUtil.a iPhoneOS/armv7/libPocoUtil.a iPhoneSimulator/i386/libPocoUtil.a -o PocoUtil.a
lipo -c iPhoneOS/armv6/libPocoXML.a iPhoneOS/armv7/libPocoXML.a iPhoneSimulator/i386/libPocoXML.a -o PocoXML.a
lipo -c iPhoneOS/armv6/libPocoZip.a iPhoneOS/armv7/libPocoZip.a iPhoneSimulator/i386/libPocoZip.a -o PocoZip.a