Mr Aleph
Mr Aleph

Reputation: 1895

Linking a lib written in C in XCode + Objective-C

Is it possible to use a library I wrote in C (compiled with GCC on a Mac) on an Objective-C project under XCode?

The project is for a Mac OS X app, not iOS. The library was compiled via GCC on the command line and it is in C (as in C language) and the header for the library (.h file) is a simple C header with function declarations.

If yes, how? Furthermore, do I need to convert the .h files to an objective-c styled header?

Thank you!

Upvotes: 1

Views: 1847

Answers (1)

Alex Reynolds
Alex Reynolds

Reputation: 96976

You might take a look at Using static libraries with iPhone SDK.

Upvotes: 1

Related Questions