Professional Web Applications Themes

Command line compiler arguments to build a framework? - Mac Programming

What arguments do I need to pass the command line compiler in order to build a file as a framework?...

  1. #1

    Default Command line compiler arguments to build a framework?

    What arguments do I need to pass the command line compiler in order to
    build a file as a framework?
    Tron Guest

  2. #2

    Default Re: Command line compiler arguments to build a framework?

    In article <google.com>,
    net (Tron Thomas) wrote:
     

    You don't. You build the framework executable and then you have to manually
    build the rest of the infrastructure for a framework (folders, resources,
    headers, etc)

    hth

    meeroh

    --
    If this message helped you, consider buying an item
    from my wish list: <http://web.meeroh.org/wishlist>

    Miro Guest

  3. #3

    Default Re: Command line compiler arguments to build a framework?

    So all I have to do is build a dynamic linked shared library without
    the dylib extension and the package it up in the correct directory
    structure to create the frame work, right?

    Miro Jurisic <org> wrote in message news:<mit.edu>... 
    >
    > You don't. You build the framework executable and then you have to manually
    > build the rest of the infrastructure for a framework (folders, resources,
    > headers, etc)
    >
    > hth
    >
    > meeroh[/ref]
    Tron Guest

  4. #4

    Default Re: Command line compiler arguments to build a framework?

    In article <google.com>,
    net (Tron Thomas) wrote:
     

    I _think_ so, but the best way to find out is to run Project Builder or Xcode,
    build a trivial framework, turn up the logging level to maximum, and see what
    commands it executes.

    hth

    meeroh

    --
    If this message helped you, consider buying an item
    from my wish list: <http://web.meeroh.org/wishlist>

    Miro Guest

  5. #5

    Default Re: Command line compiler arguments to build a framework?

    I compiled a simple dynamic share object library and create the proper
    directory structure around it to define it as a framework.

    I then copied that framework into ~/Library/Frameworks

    I was able to write a program that successfully links with the
    framework. However, when I try to run the program, it complains that
    it can't find the shared object library.

    I was also created the same framework in Project Builder. I built
    that framework and copied it into ~/Library/Frameworks. That
    framework links fine and the application has no problems running. I
    have not been able to tell what's different between the frame work
    Project Builder created and the one I create from scratch.

    I am using Project Builder 2.1. How do I make sure the logging level
    is turned up to maximum?

    Miro Jurisic <org> wrote in message news:<mit.edu>... 
    Tron Guest

  6. #6

    Default Re: Command line compiler arguments to build a framework?

    In article <google.com>,
    net (Tron Thomas) wrote:
     
    I suspect that the install path of your shared library is incorrect. You should
    inspect the library and the framework using otool -L and see if the library
    paths differ.

    hth

    meeroh

    --
    If this message helped you, consider buying an item
    from my wish list: <http://web.meeroh.org/wishlist>

    Miro Guest

  7. #7

    Default Re: Command line compiler arguments to build a framework?

    Before posting my previous results, I had also suspected the install
    path as a cause for the problem. When I built the framework in
    Project Builder I explicitly remove the install path specification
    from the framework's build settings to see what kind of effect that
    would have on whether the framework could be used succesfully.

    Because there was no install directory for the framework, I did not
    use pbxbuild -install to place the framework in the
    ~/Library/Framework directory. I just simply copied it there by
    dragging and drop the framework from within the Finder.

    Depsite not giving an install directory to the framework, it still
    works when used with the test application.

    I have also discover the following:
    If I build the test application and link it against the Project
    Builder framework the program runs successfully even if I replace the
    Project Builder framework with the hand made framework after the
    application has been compiled and built.

    If I build the test application and link it against my hand made
    framework, the test application will always fail to find the dynamic
    library for the framework, regardless of which framework I used when
    I'm running the program.

    I also tried the otool command you suggested. otool provided
    essentially the same information for both dynamic libraries except for
    one small difference. If I ran otool in the Project Builder library,
    otool would provide the fully qualified path name for the library in
    its output regardless of library's location. If I used otool on the
    library from the library's build location, otool would provide the
    build location of the library. If I used otool from the installed
    location of the library, otool would provide the install location.
    When I used otool on the library I build myself, otool would only
    provide the name of the library without any path information
    regardless of where the library was located.

    It seems that I am missing one or more build options that need to
    incorporate into building my dnamic library. How can I know all the
    build options Project Builder uses when it builds the libary for the
    framework?

    Miro Jurisic <org> wrote in message news:<mit.edu>... 
    Tron Guest

  8. #8

    Default Re: Command line compiler arguments to build a framework?

    In article <google.com>,
    net (Tron Thomas) wrote:
     

    I believe that turning on logging to th emaximum level in PB build settings will
    let you see this.

    hth

    meeroh

    --
    If this message helped you, consider buying an item
    from my wish list: <http://web.meeroh.org/wishlist>

    Miro Guest

  9. #9

    Default Re: Command line compiler arguments to build a framework?

    Yes, how do I set Project Builder logging to its maximum level?

    Miro Jurisic <org> wrote in message news:<mit.edu>... 
    >
    > I believe that turning on logging to th emaximum level in PB build settings will
    > let you see this.
    >
    > hth
    >
    > meeroh[/ref]
    Tron Guest

  10. #10

    Default Re: Command line compiler arguments to build a framework?

    In article <mit.edu>,
    Miro Jurisic <org> wrote:
     
    >
    > I believe that turning on logging to th emaximum level in PB build
    > settings will let you see this.[/ref]

    Is there a log level option in PB's UI? I'm not aware of one.

    You should be able to see the commands it uses for building a framework
    by opening your build window and dragging the slider at the bottom of
    the window (there's a dimple in the center of it) towards the top of the
    window. The view that appears will show you the raw commands from the
    build.

    -Eric

    --
    Eric Albert edu
    http://rescomp.stanford.edu/~ejalbert/
    Eric Guest

  11. #11

    Default Re: Command line compiler arguments to build a framework?

    I read some doentation that said you can set the log level to
    Detailed. I never found out how to do this.

    I did find the build output you spoke of and that helped me solve the
    problem, although the solution is a little strange and might even be a
    bug.

    In order to get the dynamic library to compile successfully for use in
    a frame work I had to make sure the argument for the output of the
    link process contained a fully qualified path such as:

    g++ (compiler options...) Code.cpp -dynamiclib -o <Fully qualified
    path>/<Library name>

    Use of a relative path or no path at all causes the framework to link
    successfully and then to fail to load when executing.

    The fully qualified path does not have to be the final directory the
    library will end up it. It just needs the the path you want the
    library at when you build it.

    Eric Albert <edu> wrote in message news:<stanford.edu>... 
    Tron Guest

Similar Threads

  1. Replies: 0
    Last Post: October 27th, 11:14 AM
  2. command line arguments
    By pop83in in forum Dreamweaver AppDev
    Replies: 0
    Last Post: March 28th, 07:54 AM
  3. swf command line compiler
    By Monika in forum Macromedia Flash
    Replies: 0
    Last Post: July 14th, 05:57 AM
  4. Any way to pass arguments to projectors from Windows command line?
    By matt_s webforumsuser@macromedia.com in forum Macromedia Director Lingo
    Replies: 5
    Last Post: November 30th, 10:57 PM
  5. Regexp constructed from command line arguments.
    By Tad McClellan in forum PERL Miscellaneous
    Replies: 2
    Last Post: July 7th, 05:01 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139