• 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: gcc -dymanic? or -shared?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gcc -dymanic? or -shared?


  • Subject: Re: gcc -dymanic? or -shared?
  • From: Jonas Maebe <email@hidden>
  • Date: Wed, 8 Feb 2006 21:57:41 +0100


On 8 feb 2006, at 21:50, email@hidden wrote:

jason-t-slacks-power-mac-g4-agp-graphics:~/Desktop slack$ gcc -c
MySharedLibrary.c
jason-t-slacks-power-mac-g4-agp-graphics:~/Desktop slack$ gcc - dynamic -o
MySharedLibrary.dylib MySharedLibrary.o
jason-t-slacks-power-mac-g4-agp-graphics:~/Desktop slack$ gcc -o myprog main.c
-L./ MySharedLibrary.dylib
/usr/bin/ld: MySharedLibrary.dylib is input for the dynamic link editor, is not
relocatable by the static link editor again
collect2: ld returned 1 exit status


And I dont see why, I have never done this before.

This is what you want:

gcc -dynamiclib MySharedLibrary.c -o libMySharedLibrary.dylib
gcc -o myprog main.c -L. -lMySharedLibrary


Jonas _______________________________________________ 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: 
 >gcc -dymanic? or -shared? (From: email@hidden)
 >Re: gcc -dymanic? or -shared? (From: Chris Espinosa <email@hidden>)
 >Re: gcc -dymanic? or -shared? (From: email@hidden)

  • Prev by Date: Re: gcc -dymanic? or -shared?
  • Next by Date: Re: RTTI and exceptions between plugins (solution)
  • Previous by thread: Re: gcc -dymanic? or -shared?
  • Next by thread: Re: gcc -dymanic? or -shared?
  • Index(es):
    • Date
    • Thread