From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-version: 1.0 Message-id: <856A9289-A66E-4042-883B-E4D7383F3BF6@mac.com> From: Pietro Gagliardi To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> In-reply-to: <140e7ec30812151816l69ee7e9dla0279d4cd39eaa71@mail.gmail.com> Content-type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary=Apple-Mail-3--168118932 Date: Mon, 15 Dec 2008 21:31:07 -0500 References: <95568f93ecebea5f9de8bbf366d7325d.squirrel@webmail.kix.es> <4946E785.9000202@kix.es> <140e7ec30812151816l69ee7e9dla0279d4cd39eaa71@mail.gmail.com> Content-transfer-encoding: 7bit Subject: Re: [9fans] 9P in C++ Topicbox-Message-UUID: 62608a8a-ead4-11e9-9d60-3106f5b1d025 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --Apple-Mail-3--168118932 Content-Type: multipart/alternative; boundary=Apple-Mail-2--168119007 --Apple-Mail-2--168119007 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit On Dec 15, 2008, at 9:16 PM, sqweek wrote: > 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 > Ah yes, something I forgot while drifting through the hordes of gcc madness that is... not using gcc. Thanks for refreshing my memory. Now to see if this is working for kix. --Apple-Mail-2--168119007 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable
On Dec 15, 2008, at = 9:16 PM, sqweek wrote:

On = Tue, Dec 16, 2008 at 8:34 AM, Pietro Gagliardi <pietro10@mac.com> = 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


Ah yes, = something I forgot while drifting through the hordes of gcc madness that = is... not using gcc. Thanks for refreshing my memory. Now to see if this = is working for kix.

= --Apple-Mail-2--168119007-- --Apple-Mail-3--168118932 content-type: application/pgp-signature; x-mac-type=70674453; name=PGP.sig content-description: This is a digitally signed message part content-disposition: inline; filename=PGP.sig content-transfer-encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (Darwin) iEYEARECAAYFAklHEusACgkQuv7AVNQDs+wv2ACePTqyBedRHCLTIkO1avQcFzZn Wl0AoK8F2RZ2vITjVC9egkmXeY/3MSgy =cL8H -----END PGP SIGNATURE----- --Apple-Mail-3--168118932--