• 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: Chiara Sandionigi <email@hidden>
  • Date: Thu, 30 Aug 2007 16:05:20 +0200

First of all, thanks for the information.
Unfortunately I have not solved the problem yet.
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


On 29/ago/07, at 17:17, Peter O'Gorman wrote:

On Wed, 2007-08-29 at 16:53 +0200, Chiara Sandionigi wrote:
Hi!
I have a problem with cctools, in particular the problem regards the  
options of ld. I'm compiling files created for Linux distributions,  
so I have a problem regarding the passage from GNU binutils to cctools.
The error is the following:
[ 2/98] * mkshared : lib/systemc/libsystemc.a -> _build_/default/lib/ 
systemc/libsystemc.dylib
/usr/bin/ld: unknown flag: -E
collect2: ld returned 1 exit status
I have the same problem with flags --whole-archive and --no-whole- 
archive.
Does somebody know which are the equivalent options with cctools?
Thanks for any help

There are man pages for gcc and ld that you could consult...

However, -E is --export-dynamic, which is not necessary, symbols are
exported by default.

There's no equivalent for --whole-archive and --no-whole-archive (I did
file a bug on it - it was marked as a duplicate). There is an option
-all_load, but it is not very useful as it will cause all members of all
static archives to be loaded. You will probably have to extract all the
objects and use them directly.

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: Peter O'Gorman <email@hidden>
References: 
 >Unrecognized ld flags (From: Chiara Sandionigi <email@hidden>)
 >Re: Unrecognized ld flags (From: Peter O'Gorman <email@hidden>)

  • Prev by Date: Re: Guidelines for talking about Xcode 2.5 on this list
  • 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