Re: Dynamic Shared Libraries
Re: Dynamic Shared Libraries
- Subject: Re: Dynamic Shared Libraries
- From: Jim Ingham <email@hidden>
- Date: Thu, 12 May 2005 10:03:10 -0700
g++ -dynamiclib foo.o bar.o -o myLib.dylib
should do the trick. By default gcc builds .o's that are position
independent, so you don't have have to do anything special to make
your .o's.
The easiest way to figure this sort of thing out is to make a target
of the type you are trying to build in Xcode, then open the Build
results, and look at the Detailed build log (you have to click on the
little button above the divider bar that looks like some lines of
text to see the "build transcript"). That will show you all the
parameters that Xcode passes to gcc to build a target of that type.
You probably want to do something like that.
Jim
On May 12, 2005, at 9:45 AM, Yee Hsu wrote:
Hello, I am new to programming C++ on the mac.
I have some pieces of code written in linux but needed to be port
to mac.
The codes compile fine into object .o files. But I do not know how
to create dynamic shared libraries on the mac.
How do I do that? I am getting all kinds of link, ld, library errors.
Does anyone know how do I compile c++ code with gcc to create
object files that can then create dynamic libraries?
I tried various ways of using gcc and libtool with no success.
Thanks,
yee
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden