Re: Unrecognized ld flags
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