site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:cc:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=jqN3I6+mBmGmeqG2v+I7C/vtd7sd9L+4xZiugjTLvAM=; b=XzvkL51sCDagLnc1gB1+Sfj+D2VxmyJOvIU2G/JC1Oc7wdR3v9yh/KzMhk5Sb9t60N JtkCtPnD9L3cVef1wqqziTqzVa9d9gxK0YeP18rZTg8Pr0PpHuv8GXajta2hf7srkR7z jswgye/5xiNdC/kqO/1Tne832rOC5c1pTHIRU= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=cc:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=hkR4ovWF//HUmKxF5kzG/RMh5wW5plmgiBoEpzzh6PdaFmhYA3UTIc6XSq+JM0n+gI HZy7aG78i+B/27Nkx/jOvCMq+1OWZ/0rgANt0mLpAlsh2vmQUcFykS9/OXAMvyRkvQH+ q5D/HBDdHUamiD+NQo/R/vbKAVQu/nNOpl0Ho= Like Jean-Daniel Dupas said, if the linker can't find the library, and you know the library exists, then the first thing to do is to make sure that the library's location is in the linkers search path. Try adding -L/usr/local/lib as a linker flag, but be sure to pass it as the first flag as opposed to appending it to the end; if I recall correctly that sometimes matters. -Patrick On Jun 4, 2008, at 3:16 PM, Fabrizio Bertocci wrote: Well, Unfortunately that is not the problem... because the error I get are about some unresolved externals, and not library not found (that is the error you get when the linker can't find the right library). Interesting enough, when I try with a small library (typical hello world-style), everything works, but not with the xmlrpc-c library... I will continue investigating this issue... F On Wed, Jun 4, 2008 at 7:11 AM, Jean-Daniel Dupas <devlists@shadowlab.org> wrote: I don't think it is part of the default search path. Le 4 juin 08 à 14:58, Fabrizio Bertocci a écrit : I'm having a weird problem with the linker I cannot explain. Before filing it as a possible bug, I'd like to have your opinion on that. When I add those libraries to my Xcode project, Xcode end up passing them to the link phase using the -l<lib> form: -lfoo -lbar -lfoo++ -lbar++ Unfortunately, the link phase reports a bunch of unresolved symbols. To be more specific, this is *NOT* working: ld <...> -lxmlrpc++ -lxmlrpc_server_abyss++ -lxmlrpc_server++ -lxmlrpc_server_abyss -lxmlrpc_server -lxmlrpc_abyss -lxmlrpc_util -lxmlrpc_xmlparse -lxmlrpc_xmltok -lxmlrpc and this IS WORKING: -lxmlrpc++ -lxmlrpc_server_abyss++ -lxmlrpc_server++ -lxmlrpc_server_abyss -lxmlrpc_server -lxmlrpc_abyss -lxmlrpc_util -lxmlrpc_xmlparse -lxmlrpc_xmltok /usr/local/lib/libxmlrpc.a Weird isn't it? Am I missing something? Is it really a bug ? Thanks for your opinion. Fab _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/rutski89%40gmail.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... is /usr/loca/lib in your library search path in Xcode target build settings ? Brief description: I'm building an executable (command-line) that requires some external libraries. Let's say I need to link (statically) with: /usr/local/lib/libfoo.a /usr/local/lib/libbar.a /usr/local/lib/libfoo++.a /usr/local/lib/libbar++.a If I invoke by hand ld by specifying the static libs directly as input files instead of libraries everything works fine: ld ... /usr/local/lib/libfoo.a /usr/locallib/libbar.a /usr/local/lib/libfoo++.a /usr/local/lib/libbar++.a Interested? If you want to reproduce it, download the xmlrpc-c library from Sourceforge (xmlrpc-c.sourceforge.net), build it and install it under /usr/local and try to build one of the example first using the form that uses the -l<lib> flag, and then with the other form. In my case I also discovered that ONLY ONE library needs to be listed using /usr/local/lib/<blah>.a... This email sent to rutski89@gmail.com This email sent to site_archiver@lists.apple.com