From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <140e7ec30812151816l69ee7e9dla0279d4cd39eaa71@mail.gmail.com> Date: Tue, 16 Dec 2008 11:16:06 +0900 From: sqweek To: "Fans of the OS Plan 9 from Bell Labs" <9fans@9fans.net> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <95568f93ecebea5f9de8bbf366d7325d.squirrel@webmail.kix.es> <4946E785.9000202@kix.es> Subject: Re: [9fans] 9P in C++ Topicbox-Message-UUID: 625b0e0c-ead4-11e9-9d60-3106f5b1d025 On Tue, Dec 16, 2008 at 8:34 AM, Pietro Gagliardi wrote: > On Dec 15, 2008, at 6:25 PM, Rodolfo kix Garcia wrote: >> gcc -L /usr/local/plan9/lib -L. -ltry -lthread demo1.C -o demo1 ## OK! > > I think linking lthread will give you POSIX threads and that -L appends to > the list, rather than going before, so /usr/lib will be searched before > plan9ports. Try explicitly setting the path of the -l argument. Does > -l/usr/local/plan9/lib/libthread.so (or whatever it is) help? You can't use -l with a full path, but you can simply specify the full path of the library: gcc -o demo1 demo1.C /usr/local/plan9/lib/libthread.a Note that the order of the objects on the command-line is as usual important. -sqweek