How to build static library for iOS on linux
NickName:Dallum Ask DateTime:2013-04-11T13:21:15

How to build static library for iOS on linux

I have c++ static library written on linux. Is it possible to build this library for iOS?

I have installed g++-arm-linux-gnueabi, but when i try to do this:

arm-linux-gnueabi-g++-4.7 main.cpp -o mn -march=armv7

output is:

target CPU does not support ARM mode

Thanks and sorry for my english

Copyright Notice:Content Author:「Dallum」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/15941292/how-to-build-static-library-for-ios-on-linux

Answers
Shane Hou 2013-04-11T06:40:07

0: If you don't have source code, then it's impossible. Else read below:\n\n1: Create a new C/C++ library in XCode(Below OS X->Framework & Library).\n\n2: Put ALL your header files into a dictionary(It's not a must but it will help a lot to organize your project later, and also your header import path).\n\n3: Import your source code into library project.\n\n4: Drag library project dictionary into project window you want to import. Remember ONLY keep header files outside library project, remove anything else to prevent some unexpected issue caused by XCode when compiling. It's hard to explain with words, just let me show you a screenshot:\n\n\n\n5: Set dependencies & header search path, then you are good to go.\n\nSounds quite easy, right? Don't be fooled.\n\nYou will meet many detailed problems such as XCode can't find your header paths, link error(symbol not found), compiler error or using wrong C++ standards, CPU architecture..... etc.\n\nBut these can be solved, just give it a try, and it's worth trying :)",


More about “How to build static library for iOS on linux” related questions

How to build static library for iOS on linux

I have c++ static library written on linux. Is it possible to build this library for iOS? I have installed g++-arm-linux-gnueabi, but when i try to do this: arm-linux-gnueabi-g++-4.7 main.cpp -o...

Show Detail

build static library for iOS on windows

I want to cross-build a C++ static library on Windows or Linux (*.a), which will be included in Xcode 4, and finally used in iOS app. Can anyone tell me how to do it?

Show Detail

ios: how to build static library for simulator?

Hi I am having trouble testing a static library through the simulator. If I build the static library when the scheme is iPhone simulator, no *.a file gets generated. It is only generated if the sch...

Show Detail

How to build universal ios static library

I'm trying to build a static library that I can use with both ios3.x and ios4.x. I can build a static library with ios3.0 that works with another project in ios3.0 but won't compile in ios4. The sa...

Show Detail

Build a linux static library

For a website of mine I'm trying to make wkhtmltopdf(Link) work. The website is hosted on a shared hosting, which are a bit troublesome when using libraries not installed. After a few tries with

Show Detail

Build a static library for iOS - specifically spatialite

First, please forgive and point out if I am to use some other protocol for referencing another thread/post. There was a previous thread how to compile spatialite for iOS where the top answer partly

Show Detail

How build a static library with maximum compatibility on iOS?

I'm writing a static library for ios developers. How build a static library with maximum compatibility on iOS? In other words, support different types of projects in future. Such as, 3.0~ version...

Show Detail

iOS Static Library as a Subproject of a Project That Has Custom Build Configurations?

I'm trying to share code between multiple Xcode projects. I've followed Apple's notes on creating a static library subproject within a project: http://developer.apple.com/library/ios/technotes/

Show Detail

Facebook iOS SDK - How to build static library for Xcode 4.3?

I'm integrating Facebook to my iOS ARC app by following instructions in this link. i'm stuck at building static library step. https://developers.facebook.com/docs/mobile/ios/build/ I'm using Xco...

Show Detail

how to build PoDoFo library for iOS

This may be a copy of this question How can I use the PoDoFo library for annotating PDFs on iOS? not responded yet. i know how to use/create static libraries into xcode projects for iOS. i was look...

Show Detail