Re: Unrecognized ld flags
Re: Unrecognized ld flags
- Subject: Re: Unrecognized ld flags
- From: Chiara Sandionigi <email@hidden>
- Date: Thu, 30 Aug 2007 18:35:51 +0200
On 30/ago/07, at 18:11, Peter O'Gorman wrote:
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'm sorry, there was a space between -Wl and -all_load ...
However, after removed the space, the error is
/usr/bin/libtool: both -all_load and -noall_load can't be specified
So I have written
mkshared_str = '${CXX} -dynamiclib ${CXXFLAGS} -o ${TGT} -Wl,-all_load'
but I have the same error
If I remove -Wl, I have the error
g++: no input files
These questions are all better for the unix-porting list, they're much
more on-topic there.
Thanks for the hint
_______________________________________________
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