This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: order of arguments on command line when linking



>>>> There are various ways to handle this.  One is to order things
>>>> carefully.  Another is to have the linker search the libraries
>>>> multiple times; see the ld manual.

Thanks, Tom.

I finally got myself to reading the gcc and ld man pages which contain the
solution:

	-Xlinker --start-group myarc1.a myarc2.a myarc3.a -Xlinker --end-group

-Xlinker passes the next argument to ld
everything between --start-group and --end-group will be searched repeatedly
as needed.

That spares me indeed from ordering libraries carefully. And it also solves
cases where libraries recursively depend on each other.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]