| Computers Forum Index » Computer Languages (Objective-C) » Creating C library... |
|
Page 1 of 1 |
|
| Author |
Message |
| rinyogi... |
Posted: Mon Aug 17, 2009 5:14 am |
|
|
|
Guest
|
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.. |
|
|
| Back to top |
|
|
|
| Pascal J. Bourguignon... |
Posted: Mon Aug 17, 2009 11:47 am |
|
|
|
Guest
|
rinyogi <rinyogi03 at (no spam) gmail.com> writes:
Quote: 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.
Quote: If yes, how do you include these libraries in the project structure?
#include <yourlibrary.h> /* exactly like in a C program */
--
__Pascal Bourguignon__ |
|
|
| Back to top |
|
|
|
| spikeysnack... |
Posted: Thu Oct 08, 2009 10:08 pm |
|
|
|
Guest
|
On Aug 17, 12:47 am, p... at (no spam) informatimago.com (Pascal J. Bourguignon)
wrote:
Quote: rinyogi <rinyog... at (no spam) 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__
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 |
|
|
| Back to top |
|
|
|
| Stefan Arentz... |
Posted: Fri Oct 09, 2009 5:17 am |
|
|
|
Guest
|
spikeysnack <spikeysnack at (no spam) gmail.com> writes:
Quote: On Aug 17, 12:47 am, p... at (no spam) informatimago.com (Pascal J. Bourguignon)
wrote:
rinyogi <rinyog... at (no spam) 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__
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
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. |
|
|
| Back to top |
|
|
|
|