• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Dynamic Shared Libraries
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >Dynamic Shared Libraries (From: "Yee Hsu" <email@hidden>)

  • Prev by Date: Re: Constant crashes with XCode 2 debugger
  • Next by Date: Re: Xcode 2.0 Slow debugger loading
  • Previous by thread: Dynamic Shared Libraries
  • Next by thread: FileMerge "compress white space" not applied on folders?
  • Index(es):
    • Date
    • Thread