• 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: Unrecognized ld flags
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unrecognized ld flags


  • Subject: Re: Unrecognized ld flags
  • From: Peter O'Gorman <email@hidden>
  • Date: Thu, 30 Aug 2007 11:11:04 -0500

On Thu, 2007-08-30 at 17:43 +0200, Chiara Sandionigi wrote:
> On 30/ago/07, at 17:08, Peter O'Gorman wrote:
>
> > On Thu, 2007-08-30 at 16:05 +0200, Chiara Sandionigi wrote:
> >> I must rewrite the following code line to work on Mac
> >> mkshared_str = '${CXX} -shared ${CXXFLAGS} -o ${TGT} -Wl,-E
> >> -Wl,--whole-archive ${SRC} -Wl,--no-whole-archive -lstdc++ -lc'
> >> I have rewritten it as follows
> >> mkshared_str = '${CXX} -dynamic ${CXXFLAGS} -o ${TGT} -Wl,-all_load'
> >> but now I have the following error
> >> /usr/bin/ld: Undefined symbols:
> >> _main
> >> collect2: ld returned 1 exit status
> >
> > Use -dynamiclib rather than -dynamic (and perhaps add the sources).
>
> Now I have
> 	mkshared_str = '${CXX} -dynamiclib ${CXXFLAGS} -o ${TGT} -Wl, -
> all_load ${SRC}'
> but I get the following error
> 	/usr/bin/libtool: can't open file: (No such file or directory)

Is there really a space between your -Wl, and -all_load, or is it
something that the mailer inserted? You can remove the -Wl, anyway, as
the option is accepted by gcc.

I really don't understand why there is a static archive "${SRC}", why
not just add the objects.

If the errant space is not the issue, please show the expanded link
line.

These questions are all better for the unix-porting list, they're much
more on-topic there.

Peter
 _______________________________________________
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

  • Follow-Ups:
    • Re: Unrecognized ld flags
      • From: Chiara Sandionigi <email@hidden>
References: 
 >Unrecognized ld flags (From: Chiara Sandionigi <email@hidden>)
 >Re: Unrecognized ld flags (From: Peter O'Gorman <email@hidden>)
 >Re: Unrecognized ld flags (From: Chiara Sandionigi <email@hidden>)
 >Re: Unrecognized ld flags (From: Peter O'Gorman <email@hidden>)
 >Re: Unrecognized ld flags (From: Chiara Sandionigi <email@hidden>)

  • Prev by Date: Re: Unrecognized ld flags
  • Next by Date: Re: Unrecognized ld flags
  • Previous by thread: Re: Unrecognized ld flags
  • Next by thread: Re: Unrecognized ld flags
  • Index(es):
    • Date
    • Thread