On Tue, Dec 16, 2008 at 8:34 AM, Pietro Gagliardi <[email protected]> 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
