Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jyotsna.kadam

macrumors newbie
Original poster
Jan 29, 2009
4
0
Pune India
Hi to all,

In am developing one application for iphone, where I want to integrate third party API's with my application. I have two .h files and one .a files. The header files contains only method declaration. I want to invoked that method into my application. I set the header search path and library search path. Then I tried to invoked the method into my application but it's giving error as "method name:referenced from". I am stucked. I cant able to understand how to deal with this problem. So I can invoked the method into my application.
Also I have archive file with .a extension which contain executable code of methods. Is there any need that I have to extract that archive files or not? I refer this

"https://forums.macrumors.com/threads/472097/" link to extract archive file but it's giving me error as
macdesk06 Developer mac4$ ar -t thirdAPI.a
ar: thirdAPI.a: Inappropriate file type or format
I cant able to understand how to implement third party API's with my application.

If anyone knows it. Please reply me as soon as possible :(
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
What processor architecture was the library built for? What ABI? Unless it was compiled for the Simulator (if you are building for the simulator) or the iPhone (if you are building for the device) this won't work. Note this means you need different .a files for the Simulator or Device.

This would be a lot easier if you had the source code...
 

buckyballs

macrumors regular
Dec 22, 2006
176
97
So you don't spend ages on it and get disappointed:

The iPhone SDK agreement prohibits the use of third-party precompiled frameworks in your app. You have to have the source code and complile it with the rest of the app
 

Guiyon

macrumors 6502a
Mar 19, 2008
771
4
Cambridge, MA
The iPhone SDK agreement prohibits the use of third-party precompiled frameworks in your app. You have to have the source code and complile it with the rest of the app

Not quite; it prohibits the use of frameworks or dynamic libraries. Statically linked libraries are still fine.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.