Welcome to Soft32 Forums!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Command line compiler arguments to build a framework?

 
   Soft32 Home -> Mac -> Programmer Help RSS
Next:  How to resize an table cell to display the comple..  
Author Message
Tron Thomas

External


Since: Jun 29, 2004
Posts: 53



(Msg. 1) Posted: Sat Nov 01, 2003 2:32 pm
Post subject: Command line compiler arguments to build a framework?
Archived from groups: comp>sys>mac>programmer>help (more info?)

What arguments do I need to pass the command line compiler in order to
build a file as a framework?
Back to top
Login to vote
Miro Jurisic

External


Since: May 10, 2004
Posts: 1194



(Msg. 2) Posted: Sun Nov 02, 2003 6:17 am
Post subject: Re: Command line compiler arguments to build a framework? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <a4171f97.0311012032.538c6a64.RemoveThis@posting.google.com>,
tron.thomas.RemoveThis@verizon.net (Tron Thomas) wrote:

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

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>
Back to top
Login to vote
Tron Thomas

External


Since: Jun 29, 2004
Posts: 53



(Msg. 3) Posted: Sun Nov 02, 2003 1:59 pm
Post subject: Re: Command line compiler arguments to build a framework? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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 <macdev RemoveThis @meeroh.org> wrote in message news:<macdev-3D5437.12171502112003 RemoveThis @senator-bedfellow.mit.edu>...
> In article <a4171f97.0311012032.538c6a64 RemoveThis @posting.google.com>,
> tron.thomas RemoveThis @verizon.net (Tron Thomas) wrote:
>
> > What arguments do I need to pass the command line compiler in order to
> > build a file as a framework?
>
> 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
Back to top
Login to vote
Miro Jurisic

External


Since: May 10, 2004
Posts: 1194



(Msg. 4) Posted: Sun Nov 02, 2003 6:54 pm
Post subject: Re: Command line compiler arguments to build a framework? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <a4171f97.0311021959.65b31419 RemoveThis @posting.google.com>,
tron.thomas RemoveThis @verizon.net (Tron Thomas) wrote:

> 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?

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>
Back to top
Login to vote
Tron Thomas

External


Since: Jun 29, 2004
Posts: 53



(Msg. 5) Posted: Tue Nov 04, 2003 7:00 am
Post subject: Re: Command line compiler arguments to build a framework? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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 <macdev.TakeThisOut@meeroh.org> wrote in message news:<macdev-0899DA.00543603112003.TakeThisOut@senator-bedfellow.mit.edu>...
> 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
Back to top
Login to vote
Miro Jurisic

External


Since: May 10, 2004
Posts: 1194



(Msg. 6) Posted: Tue Nov 04, 2003 10:32 am
Post subject: Re: Command line compiler arguments to build a framework? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <a4171f97.0311041300.30dac5b0.DeleteThis@posting.google.com>,
tron.thomas.DeleteThis@verizon.net (Tron Thomas) wrote:

> 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 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>
Back to top
Login to vote
Tron Thomas

External


Since: Jun 29, 2004
Posts: 53



(Msg. 7) Posted: Wed Nov 05, 2003 5:41 am
Post subject: Re: Command line compiler arguments to build a framework? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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 <macdev.DeleteThis@meeroh.org> wrote in message news:<macdev-7F989C.16324004112003.DeleteThis@senator-bedfellow.mit.edu>...
> In article <a4171f97.0311041300.30dac5b0.DeleteThis@posting.google.com>,
> 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
Back to top
Login to vote
Miro Jurisic

External


Since: May 10, 2004
Posts: 1194



(Msg. 8) Posted: Wed Nov 05, 2003 9:03 am
Post subject: Re: Command line compiler arguments to build a framework? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <a4171f97.0311051141.49326916.DeleteThis@posting.google.com>,
tron.thomas.DeleteThis@verizon.net (Tron Thomas) wrote:

> How can I know all the build options Project Builder uses when it builds the
> libary for the framework?

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>
Back to top
Login to vote
Tron Thomas

External


Since: Jun 29, 2004
Posts: 53



(Msg. 9) Posted: Thu Nov 06, 2003 3:04 am
Post subject: Re: Command line compiler arguments to build a framework? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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

Miro Jurisic <macdev DeleteThis @meeroh.org> wrote in message news:<macdev-BAB13D.15034305112003 DeleteThis @senator-bedfellow.mit.edu>...
> In article <a4171f97.0311051141.49326916 DeleteThis @posting.google.com>,
> tron.thomas DeleteThis @verizon.net (Tron Thomas) wrote:
>
> > How can I know all the build options Project Builder uses when it builds the
> > libary for the framework?
>
> I believe that turning on logging to th emaximum level in PB build settings will
> let you see this.
>
> hth
>
> meeroh
Back to top
Login to vote
Eric Albert

External


Since: Jun 28, 2003
Posts: 201



(Msg. 10) Posted: Thu Nov 06, 2003 4:04 am
Post subject: Re: Command line compiler arguments to build a framework? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <macdev-BAB13D.15034305112003.TakeThisOut@senator-bedfellow.mit.edu>,
Miro Jurisic <macdev.TakeThisOut@meeroh.org> wrote:

> In article <a4171f97.0311051141.49326916.TakeThisOut@posting.google.com>,
> tron.thomas.TakeThisOut@verizon.net (Tron Thomas) wrote:
>
> > How can I know all the build options Project Builder uses when it
> > builds the libary for the framework?
>
> I believe that turning on logging to th emaximum level in PB build
> settings will let you see this.

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 ejalbert.TakeThisOut@stanford.edu
http://rescomp.stanford.edu/~ejalbert/
Back to top
Login to vote
Tron Thomas

External


Since: Jun 29, 2004
Posts: 53



(Msg. 11) Posted: Thu Nov 06, 2003 11:46 am
Post subject: Re: Command line compiler arguments to build a framework? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I read some documentation 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 <ejalbert.RemoveThis@stanford.edu> wrote in message news:<ejalbert-732107.10044206112003.RemoveThis@news.stanford.edu>...
>
> 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
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Need help obtaining/building SiteCopy (compiler error?) - I'm trying to build (or otherwise obtain) a binary of 'sitecopy' (http://www.lyra.org/sitecopy/ ), a program that's des...

How to add framework to a target in Xcode? - I have been experimenting with converting Project Builder targets to Xcode, and have been having problems building tar...

Error -2110 in open command - Not sure which group this should go to, but I will post here because it is related to development. I am a newbie with r...

change key mapping for Option and Command on Mac OS 9.x - Hi, I am doggedly trying to use a PC keyboard on my G4 here at work. :) It's running OS 9.0.4. I've found articles ex...
       Soft32 Home -> Mac -> Programmer Help All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum

Categories:
 Windows
 Linux
  Mac
 PDA


[ Contact us | Terms of Service/Privacy Policy ]