This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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

ld option "-larchive" not working correctly.


hi,

i have ip2k-elf toolchain installed on the cygwin on win2k. i want to
linker my library libmylib.a with the new source files. Origianally
linker command is like

ip2k-elf-ld -o outfile.elf  ...  file1.o file2.o -lgcc

if i add the the option -lmylib in the following way

ip2k-elf-ld -lmylib -o outfile.elf ... file1.o file2.o -lgcc

It did not link my library with the other object files. But if i add
option at end of command like

ip2k-elf-ld -o outfile.elf  ...  file1.o file2.o -lgcc -lmylib

it works in this way. 

Is there some specific reason for this. i have the limitation that in
the IDE i am using, i can only add the command line options with the
executable file name (ip2k-elf-ld -options other-arguments ...), like i
write the second command. i cant specify command line options to put at
end of line as in the 3rd command. 

kindly help me to resolve this problem.

i will be thankful.

Regards, 

Amir Amin


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


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