Creating a static library with XCode cross-project references.

I have a project and am trying to move a lot of the code into a static shared library, and added a cross project reference to this library in my app.
However, when I moved a file from my app to the library (removing the reference in my app and moving the file to the library's project directory), and try building my app, I get compiler error messages as if the file I have moved doesn't exist.
When I build my library project, it says the build has succeeded, but the library.a file remains red. It is also red in the my referencing app project.
If anybody has any experience setting up cross-project references in XCode, I'd appreciate any help.
If it helps identify where the problem is, I've performed the following steps to setup the library and cross-project reference:
1. I created a new Cocoa Touch static library project in XCode which would house the shared code.
2. I changed the global settings in XCode to place the build products in a shared build directory (rather that the project directory), and made sure the intermediate build files are placed with the build products.
I changed this using the Preferences menu, but have also gone into the project info for both my app project and the library project and made made sure it is set to place the build projects in the custom shared build directory.
3. I then added a Source Tree, and made sure that the Path of the project directory of the library project.
4. I added a project reference to the library project's .xcodeproj file in my application project. I changed the library project reference so that it was relative to JIGSAW24LIBRARY.
5. I configured the library dependencies by going to my app's target's info, and adding a direct dependency to the library project.
6. In my app's info build tab, I changed the user header search paths so that it uses the search tree I setup (I used the $(SEARCHTREE_NAME) notation, but checked that this resolves to a valid path). I also made sure that the Always Search User Paths checkbox is checked, and that the Library Search Paths is blank.
7. I click-dragged the library.a file under the library project so that it was under the Link Binary With Library sub folder of my app's target.
For step 5, I've also tried adding the reference to the other project as a linked library, rather than a direct dependency, but this doesn't seem to work either.

I managed to fix the problem. The steps above seem to be correct. The problem seems to be related to the source trees that are defined...
I was previously using an absolute path for the source tree which pointed at the folder containing the library project. I changed this to a relative path to the same folder (relative from the calling project) and this seems to fix it.
I'd double checked that the absolute path specified was correct, so it looks like the user header search paths specified must be relative to the current project.

Similar Messages

  • How to create a static library using xcode ?

    Hi,
    I need to create a C static library using xcode in order to use it in another developement environment which is Free Pascal Compiler/Lazarus.
    I have very few knowledge about C. I just know how to program the function I need and I've already written my C function using xcode.
    Using Lazarus (Pascal IDE), for example, as I use IOKit, I have declared the path of IOKit in the linking section (that is /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/IOKit.framework/IOkit) . IOKit is a unix executable, and I can use the exported functions it contains in my Pascal code.
    So, I would build such kind of unix executable where I can put my own functions written in C. But I can't figure out how to do it.
    How to export my functions ? Must I use some specific C keywords to "publish" them (export, __export,...) ? How to create an executable file like IOKit ? Which kind of project must I choose in XCode ?...
    André.
    Message was edited by: sinfoni12345
    Message was edited by: sinfoni12345

    Thanks for the response.  Yes, that's how I started.  I have now managed to get it to build static libraries; the piece I was missing was the scheme stuff.  I also tried to build dynamic libraries, but still no luck with those.  It was a little confusing because sometimes if I started a new project the scheme would allow me to create output as is; other times I had to edit the scheme first.  So reading the documentation appears to have paid off after all.
    FWIW, what I was trying to build was a missing library needed for a project in Python.  The entire project has two C libraries, which I've managed to build now, altough I don't know if there are some specific options that I need to set for them to work with the C wrapper.  The C wrapper is written in Cython, which creates a C file from Python-like statements.  The end result of linking the two libraries and the compiled C wrapper should be a file that can be imported into Python, which should have an extension of ".so".
    So far the last part is not working, so I don't know if the problem is with the build settings for the libraries, or something else.

  • How to create a static library in Xcode 4.2

    I need to make a static library from a project that consists of only two files, a c module and a header file.  I haven't used Xcode before, but had no problem figuring out how to create a new project and setting up what seemed like reasonable the build options, and the build reports success.  But no output files are being created.
    I figured it was time to dig into the documentation, but when I did some searching I turned up several horror stories about not being able to get this to work.  And from people who appear to know a lot more about this than I do.  So I thought I'd ask--is it a problem doing what ought to be a relatively simple task using Xcode 4.2?
    This is not an iOS thing, just a C function that I need to call from Python.
    Any suggestions as to how I can get this to work?

    Thanks for the response.  Yes, that's how I started.  I have now managed to get it to build static libraries; the piece I was missing was the scheme stuff.  I also tried to build dynamic libraries, but still no luck with those.  It was a little confusing because sometimes if I started a new project the scheme would allow me to create output as is; other times I had to edit the scheme first.  So reading the documentation appears to have paid off after all.
    FWIW, what I was trying to build was a missing library needed for a project in Python.  The entire project has two C libraries, which I've managed to build now, altough I don't know if there are some specific options that I need to set for them to work with the C wrapper.  The C wrapper is written in Cython, which creates a C file from Python-like statements.  The end result of linking the two libraries and the compiled C wrapper should be a file that can be imported into Python, which should have an extension of ".so".
    So far the last part is not working, so I don't know if the problem is with the build settings for the libraries, or something else.

  • I want to create a second library with the same account on a separate hard drive....

    Hi,
    I am running out of room on my iMac to store all of my iTunes music and video. I want to create a second library with the same account on a separate hard drive. Will iTunes Match match both libraries ? Will I be able to acess both libraries from all my devices? Can iTunes Match merge them together so I can have easy access to everything?
    Thanks for any advice.
    christos

    Unfortunately, you can't.  The primary address for your iCloud account must be a non-Apple email account.  The only exception to this is for former MobileMe subscribers who migrated to iCloud when MobileMe closed, which was 18 months ago.

  • I have one library with around 50 Projects (this represent around 1500 pictures) I gave to hundred of them a specific keyword how can I found them ?

    I have one library with around 50 Projects (this represent around 1500 pictures)
    I gave to hundreds of them a specific keyword how can I found them ?
    Marc

    If it is ok for you I would like to ask you another question.
    With the filter settings removes I discover that I have more then 10'000 pictures !!!!!!!!
    As I'm organized to have one archive files per year, I'm discovering a lot of pictures which have a keywords "from MobileMe". Is that correct to assume that is represent the pictures from the old world from mobile.me ?
    Sorry but I can't help with this, I never used mobile me so I'm not sure how it worked.
    It seems safe to assume that the images tagged with the MobileMe keyword were in your MobileMe galeries but exactly what that indicates I can't say.
    regards

  • To create a return order with sales order as reference in CRM.

    Hi guys,
    How do i create a return order with sales order as reference in CRM. Is CRMD_BUS2000115 the transaction for this?? and if yes how do i pass sales order as reference??

    Hi,
    While archiving the documents, the backup of the documents (Archive FIles) would have been taken. Using the archive file, you can reload the required documents and do your transaction.
    It is better to check with your technical team to do the same.
    Regards
    Vijay

  • Possible to create a static library (.a) file for Xcode with Flash Builder?

    Is it possible to write code in AIR that can be compiled to static library (.a) to be used in an iPad app?

    Hey paulhart83,
    My guess is therabbitwindfall's answer was correct but where you able to find a solution to your question? If so, please do share. I need to embed my app within another app and the only way is through a static library. I'd rather not have to re-develop my app in Xcode in order to generate the .a file.
    Thanks.
    Novian

  • Corrupt document gets created in document library with document template using createlistitem workflowaction in visual studio workflow for office 365 solution

    Hi,
    My requirement is to create a document library associated to a custom content type with a document template associated. Also I need to create a document based on the template in this document library when a new item is created in another list by taking the
    reference ID of that new Item , I need to create the document with the name appended by ID. I need to do all this deployment using WSP.
    I have created document library with document template associated to content type by following instructions in below stated blog :http://blogs.msdn.com/b/chaks/archive/2011/05/19/deploying-a-document-template-file-in-content-type-in-a-office365-sandboxed-solution.aspx
    This works perfect for me.
    However, there are few observations, when going to Document Library > Library Settings > Advanced Settings > Document Template section - doesnt shows the Edit template link. When tried to look at the value for the document template using view source
    , it is giving me /Lists/MyDocsListInstance/Forms/template.dotx instead of the actual template file uploaded.
    Ignoring the above observation, when I am trying to create a sandbox based workflow in visual studio to create document in document library when new item is created in another list, I provide the ContentTypeID as the ID associated with the document library
    with template. 
    It creates the corrupt document at end of workflow. 
    I have tried using .docx instead of .dotx files for workflow as per solution provided in some of the post but it isnt resolving my issue.
    Any help is much appreciated.
    Regards,
    Krutika

    OK, I am going to throw out a lot of ideas here so hopefully they get you closer to a diagnosis. Hang on :)
    Does it happen to work for some users but not others? If so, try logging in on the "good" computer with the "bad" username. This will tell you if the problem is related to the end-user's system. Also, once the user downloads a document
    successfully can they open and work on it in Word? Also, does the document library have any custom content types associated with it or does it just use 'Document'?
    I notice that there are other folks on the web that have run into this same problem and the similarity seems to be that they are either on SharePoint 2007 or have upgraded from 2007. Did this doc library start out as a 2007 library?
    What you might want to do is this: Make a site collection from scratch in 2013 (or find one that you know was created in 2013). Choose team site (or whatever you want) for the root web and set up the security the same way you have it on the malfunctioning
    library. Now, use windows explorer to copy and paste some of the documents to the new location. Be sure you recreate any needed content types. Now test it from the troubled user's computer.
    I'm thinking there may be something that is different about the library since it was migrated through various versions and updates since 2007. I've sometimes found that there can be problems (especially with user profiles but that's a different story) with
    things that go through this evolution.

  • Itunes will not create a blank library, it creates a new library with all of my same content from the other library. I followed the instructions but itunes will not give me a blank library???

    I have looked up how to create the new blank itunes library and every site has the same copy and pasted instructions. They are simple but have no troubleshooting solutions. It creates my wifes new library with all of the same content from my library. How can I make the whole thing blank so I can sync her new device without putting all of my stuff on there?

    Having opened the supposedly blank library go to Edit > Preferences > Store and untick Show iTunes in the Cloud purchases. Should clear things up.
    tt2

  • Linking library with flash builder project?

    I have a flash builder project going and I have found I need to make various movie clips and sprites in in Flash Pro. Is there a simple way to just link my library from the .fla project to my builder project so I can access the assets made in the .fla?
    I'm using the latest version of both software packages.
    Thanks!
    -SGW

    Open your .actionScriptProperties file and set useFlashSDK to false.  This will allow you to use your older SDKs.  They are managed in the same way as Flash Builder 4.6 when this option is changed.

  • Xcode framework project reference: header files not found

    Hi, in Xcode in my main project, when I add a framework project (not the framework itself), the "Headers" directory of the referenced framework project is not added to the include search path. Is there something I can do about this other than manually setting the include path?
    Regards,
    Jochen

    fredjefrito wrote:
    I run it on Mac OS X Maverick with XCode 4.6.2 installed. GCC is also installed. Note that Command Line Tools in XCode are already installed.
    That doesn't add up. Doesn't Mavericks require Xcode5? Regardless, you should install Xcode5. Forget GCC. That's obsolete.

  • Premiere Pro CC doesn't create a new sequence with a new project

    I feel sure I must be missing something, but when I create a new project in Premiere Pro CC, it doesn't automatically create a new sequence.
    In CS6, creating a new project would cause it to pop up a list of sequence presets and then create a new, blank sequence for you.
    In CC, once you've created a project, you're left looking at an empty timeline.  You then have to go up to File, New, Sequence, and do it there.
    Seems like a strange extra step to include, no?
    Is there a setting I haven't found then makes CC create new projects with a sequence as CS6 does?

    Yes, as Jim mentions, there are other ways to create a sequence.  For example, just import your footage, and then with one clip selected, choose File > New > Sequence from Clip.  Or in the Project panel, drag a clip to the New Item icon.  Many find it easier to create the sequence that way, rather than reading through all the settings in the New Sequence dialog and trying to figure out which attributes fit the media they are working with.

  • Creating a document library with a custom template

    What I want is basically a good solution for people to be able to fill out a form on the web and then save it in the online library.
    You need to be able to automatically create a document from a template in just one or two clicks from the page and then automatically save it to the online-library.
    When this is done, the admin of the site will get a notification (this i think i know how to fix thought) so he can examine the new document instantly.
    How can this be done?

    That's more or less out of the box behaviour. Create a content type on a list or library depending on what your template is (word doc, InfoPath form, list item with styling etc.), then create an alert for your admin on the list.
    Your users can then create new items and save them in the list/library. The process is simpler with list items or InfoPath forms as they don't give you the wide choice of actions that you get in word docs etc..

  • How to create a document library with the attachments of a task list?

    Hi!
    Basically, I need to create an event handler, that in the time when a file is attached to a task, make a copy of the file in the document library. Unfortunately this requires knowledge in programming and is not even possible for me to install the software
    i need in the company computers to try. Any ideas?      

    Unless you have third party workflow options, custom development IS required.
    There are several options when it comes to the development, some of which do not require admin involvement... but they still require programming.
    Scott Brickey
    MCTS, MCPD, MCITP
    www.sbrickey.com
    Strategic Data Systems - for all your SharePoint needs

  • Create a static phone with extension number

    Hi
    I want to create a new phone in CUCM 8.6 for reception which cannot be logged out but also has an extension number. I have already have the phone installed with the mac address on CUCM and description but when i plug this in it still asks for staff login to make external calls. I am also unable to make internal calls to it from my phone.
    Any assistance would be greatly appreciated.
    Thank you

    If you're using EM, just don't use EM on that phone and assing the DN to it.
    About not being able to make calls, if you hear "your call cannot be completed as dialed..." that's CSS and partitions issues.
    HTH
    java
    if this helps, please rate
    www.cisco.com/go/pdihelpdesk

Maybe you are looking for

  • Cisco ASA 5505 configuration

    Hi, I have configured cisco ASA 5505 but I can't get access to internet using my laptop connected to the ASA. I did not use the console but the graphical interface for the configuration. I changed the inside adress of the ASA and it is 192.168.2.1. F

  • How to get the jsp page name in jsp?

    how to get the jsp page name in jsp? how the jsp get the jsp page name dynamic. thanks in advance.

  • Colors in Progress Indicator

    How to  change colors in Progress Indicator in ALV?

  • I just ran Etresoft and these are the results...Help?

    Problem description: iMac running sluggishly. EtreCheck version: 2.1.2 (105) Report generated December 11, 2014 at 4:02:28 PM EST Hardware Information: ℹ️   iMac (21.5-inch, Late 2009) (Verified)   iMac - model: iMac10,1   1 3.06 GHz Intel Core 2 Duo

  • IPhone/IPad  - 802.1x wifi  - certificates

    Hi all, I would like to know if there's possible to connect Ipnone and Ipad devices to corporate network ( 802.1x wep ) using certificates, we have a Microsoft 2003 CA . The goal is to deploy profiles (OTA if possible)  to 200 devices so they can con