Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Creating C library

2 views
Skip to first unread message

rinyogi

unread,
Aug 17, 2009, 1:14:48 AM8/17/09
to
Hi all
I am new to objective C.
I want to make one iPhone application , wherein all UI development is
in objective c and the back end process has to be carried out by a C
library.
I want to know is it possible to port C library to objective - C?
If yes, how do you include these libraries in the project structure?
Kindly help
Thanks..

Pascal J. Bourguignon

unread,
Aug 17, 2009, 3:47:56 AM8/17/09
to
rinyogi <riny...@gmail.com> writes:
> I am new to objective C.
> I want to make one iPhone application , wherein all UI development is
> in objective c and the back end process has to be carried out by a C
> library.
> I want to know is it possible to port C library to objective - C?

Yes. There's nothing to do. Objective-C is a strict superset of C.


> If yes, how do you include these libraries in the project structure?

#include <yourlibrary.h> /* exactly like in a C program */


--
__Pascal Bourguignon__

spikeysnack

unread,
Oct 8, 2009, 6:08:26 PM10/8/09
to
On Aug 17, 12:47 am, p...@informatimago.com (Pascal J. Bourguignon)
wrote:

If your library is already compiled to an object file
you may need to link it at compile time as well
gcc <....> -o MyApp mylib.o
to include it in the final executable.
If it is installed in your system you may need to use
gcc <....> -o MyApp -lClib
where the library file is called libClib.so or libClib.a

Stefan Arentz

unread,
Oct 8, 2009, 10:35:18 PM10/8/09
to
spikeysnack <spike...@gmail.com> writes:

For Xcode the better advice is: if your library comes as a .a file
then you can simply add it to your project by dragging the .a and .h
files in your project structure.

S.

0 new messages