RE: [Dev-C++] Linker :: Under the hood.
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Damien A <g_...@ho...> - 2004-05-27 16:01:41
|
<html><div style='background-color:'><DIV class=RTE> <P><BR>"ld (and therefore gcc) is sensitive about the order in which libraries and object<BR>files are specied on the command line. If libfoo.so depends on libbar.so, you<BR>must specify libfoo.so first (as counterintuitive as this may be). The reason is<BR>that ld keeps track only of unresolved symbols as it links. If libfoo.so and<BR>libbar.so depend on each other, one of the libraries will have to be specified<BR>twice (for example, -lfoo -lbar -lfoo)." -Programming Linux Games , pg 33<BR></P></DIV> <DIV></DIV>----Original Message Follows---- <DIV></DIV>From: Siva Chandra <siv...@ya...> <DIV></DIV>To: dev...@li... <DIV></DIV>Subject: [Dev-C++] Linker :: Under the hood. <DIV></DIV>Date: Thu, 27 May 2004 08:47:17 -0700 (PDT) <DIV></DIV> <P>MIME-Version: 1.0 </P> <P> </P> <DIV></DIV> <DIV></DIV> <DIV></DIV> <DIV></DIV>Hello all, <DIV></DIV> <DIV></DIV>I am trying to understand how the linker goes about <DIV></DIV>doing its work. Say I have two linker options -lx and <DIV></DIV>-ly. If I pass them in the order -lx -ly the linker <DIV></DIV>seems to be doing its job fine. But if I pass -ly -lx <DIV></DIV>the linker spits hell a lot of undefined references at <DIV></DIV>me!! Can someone throw light on how the linker goes <DIV></DIV>about doing its work under the hood. Specifically, <DIV></DIV>what has the order got to do with it? <DIV></DIV> <DIV></DIV>Siva Chandra <DIV></DIV> <DIV></DIV> <DIV></DIV> <DIV></DIV> <DIV></DIV>__________________________________ <DIV></DIV>Do you Yahoo!? <DIV></DIV>Friends. Fun. Try the all-new Yahoo! Messenger. <DIV></DIV>http://messenger.yahoo.com/ <DIV></DIV> <DIV></DIV> <DIV></DIV>------------------------------------------------------- <DIV></DIV>This SF.Net email is sponsored by: Oracle 10g <DIV></DIV>Get certified on the hottest thing ever to hit the market... Oracle 10g. <DIV></DIV>Take an Oracle 10g class now, and we'll give you the exam FREE. <DIV></DIV>http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click <DIV></DIV>_______________________________________________ <DIV></DIV>Dev-cpp-users mailing list <DIV></DIV>Dev...@li... <DIV></DIV>TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm <DIV></DIV>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users <DIV></DIV></div><br clear=all><hr>STOP MORE SPAM with <a href="http://g.msn.com/8HMAEN/2728??PS=47575">the new MSN 8</a> and get 2 months FREE*</html> |