xcode help for new library
#1
I am new to xcode type of coding.. i need to add a new library to the xbmc/lib directory and make sure the source in there compiles into a libxyz.a format and link that with plex target. experts please help...Nerd
Reply
#2
gentoo Wrote:I am new to xcode type of coding.. i need to add a new library to the xbmc/lib directory and make sure the source in there compiles into a libxyz.a format and link that with plex target. experts please help...Nerd

You mention Plex as a target. This is the XBMC for Mac forum. Plex is a fork of XBMC for Mac and they (Plex) have their own forums for support but don't mind answering your question

libxyz.a is a static library. External libraries are typical configured and compiled either as a separate XCode project or command-line make file. Then you can drag and drop the static lib into the main XCode project.

Since Plex source code in their git tends to obfuscate the creation of static libs, I would take a look (using trac) at our source tree for libSDL. It's a good example of what you want to do. Note that there are many different ways to do this, this is just one method that I find is clean and simple yet preserves the essential information about the version used, original source location, patches used and configuration and build info. All of which is essential to anyone being able to rebuild the static library.

http://trac.xbmc.org/browser/branches/li...SDL-osx.sh

This a bash script that downloads the disto source, patches it then configure/builds the various static libSDL libs that XBMC for Mac uses in the XCode project.

Have fun, we are all newbees at some time Wink
Reply
#3
Thanks for the explanation.. let me try that... You see the plex in there because I posted the question in plex also.. I am also trying twiddle with the xbmc for mac source too.. the question is common.. anyways.. thanks.. let me try this method...
Reply
#4
I do not want to keep bothering you, however, your post with libsdl example was pretty helpful...

I want to add one such opensource library to the lib directory and expand upon that library in the same directory.. something like how libgoahead is..

My question is, do I add the opensource library into the lib directory and expand upon it in the same dir and build a dynamic library out of it? I am working on a feature that I would like to expand on xbmc/plex..

please let me know what is the common procedure around here..
Reply
#5
For the most part, libraries that get modified end up in our source, under lib. Stock libraries that we use unmodified are generally just included as a dependency during build time. That's the basic rule of thumb I think, but there might be exceptions.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Please read and follow the forum rules.
For troubleshooting and bug reporting, please make sure you read this first.


Image
Reply

Logout Mark Read Team Forum Stats Members Help
xcode help for new library2