From: Earnie B. <ea...@us...> - 2005-04-22 12:08:33
|
Danny, et alii, I would like to propose that we add a message from ld when undefined symbols exist and libraries have been specified giving advice on command line order. This is one of the more frequent issues on the lists and forums. Comments? Earnie |
From: Aaron W. L. <aar...@aa...> - 2005-04-22 15:52:23
|
Earnie Boyd wrote: > I would like to propose that we add a message from ld when undefined > symbols exist and libraries have been specified giving advice on command > line order. This is one of the more frequent issues on the lists and Are you saying making a second pass over the libraries to try to find the undefined symbols and let the user know that the missing symbols are in this library, and that it needs to be placed after some other library/object? For what its worth, I think this would be excellent. Off the top of my head, I'm not sure how to get this completely right, because various sorts of loops might exist such that it might be difficult to give the user concise advice on what needs to be done. Consider the following common case: This is what is needed: ld ... -lone -ltwo -lone User tries: ld ... -lone -ltwo ld says: "-lone must follow -lone on the command line" So user tries: ld ... -ltwo -lone And of course he still gets errors. :) This is a good idea though, and it would probably lead to quicker solutions to a lot of beginner problems. I think you should suggest this on the binutils list for wider discussion. Aaron W. LaFramboise |
From: Earnie B. <ea...@us...> - 2005-04-22 22:27:08
|
On 3:52:15 pm 2005-04-22 "Aaron W. LaFramboise" <aar...@aa...> wrote: > Earnie Boyd wrote: > > > I would like to propose that we add a message from ld when > > undefined symbols exist and libraries have been specified giving > > advice on command line order. This is one of the more frequent > issues on the lists and > > Are you saying making a second pass over the libraries to try to find > the undefined symbols and let the user know that the missing symbols > are in this library, and that it needs to be placed after some other > library/object? For what its worth, I think this would be excellent. > No, I'm saying give the user instruction on how to properly form the command line when the user does ``gcc -lws2_32 foo.o -o foo.exe''. > > This is a good idea though, and it would probably lead to quicker > solutions to a lot of beginner problems. I think you should suggest > this on the binutils list for wider discussion. > > Maybe. When I've more time to concentrate on it harder. Earnie. |