ntox86-ld: cannot find -lpthread

bridged with qdn.public.qnxrtp.devtools
Post Reply
Gonzalo Chacón

ntox86-ld: cannot find -lpthread

Post by Gonzalo Chacón » Thu Nov 20, 2003 9:07 pm

Hello, When I compile happens the error:

**************************************
gcc -Wall -O3 -o libmbtest.so test.o mb.o -lpthread -shared -I
/usr/bin/ntox86-ld: cannot find -lpthread
collect2: ld returned 1 exit status
make: *** [libmbtest] Error 1
**************************************

Somebody has some idea of which it happens.

Gonzalo.

Alex Chapiro

Re: ntox86-ld: cannot find -lpthread

Post by Alex Chapiro » Thu Nov 20, 2003 9:24 pm

I think you should use -L.

Gonzalo Chacón wrote:
Hello, When I compile happens the error:

**************************************
gcc -Wall -O3 -o libmbtest.so test.o mb.o -lpthread -shared -I
/usr/bin/ntox86-ld: cannot find -lpthread
collect2: ld returned 1 exit status
make: *** [libmbtest] Error 1
**************************************

Somebody has some idea of which it happens.

Gonzalo.

David Gibbs

Re: ntox86-ld: cannot find -lpthread

Post by David Gibbs » Thu Nov 20, 2003 9:27 pm

"Gonzalo Chacon" <chgonzalo@tutopia.com> wrote:
Hello, When I compile happens the error:

**************************************
gcc -Wall -O3 -o libmbtest.so test.o mb.o -lpthread -shared -I
/usr/bin/ntox86-ld: cannot find -lpthread
collect2: ld returned 1 exit status
make: *** [libmbtest] Error 1
**************************************
Do you actually have a libpthread.a somewhere? All of the
POSIX pthread* calls are in our standard libraries and don't
need to be explicitly linked.

-David
--
QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

Gonzalo Chacón

Re: ntox86-ld: cannot find -lpthread

Post by Gonzalo Chacón » Thu Nov 20, 2003 10:15 pm

I have looked for by the library.
No. I don't have 'libpthread'.
Where I can get it?

My system is: QNX Neutrino NC 6.2.1

Thanks for advance.

Gonzalo.

Chris McKillop

Re: ntox86-ld: cannot find -lpthread

Post by Chris McKillop » Fri Nov 21, 2003 4:26 am

Gonzalo Chac?n <chgonzalo@tutopia.com> wrote:
I have looked for by the library.
No. I don't have 'libpthread'.
Where I can get it?
You don't need it. Our libc has all of the pthread API. Just drop
the -lpthread and you will be fine.

chris

--
Chris McKillop <cdm@qnx.com> "The faster I go, the behinder I get."
Software Engineer, QSSL -- Lewis Carroll --
http://qnx.wox.org/

David Gibbs

Re: ntox86-ld: cannot find -lpthread

Post by David Gibbs » Fri Nov 21, 2003 2:51 pm

Gonzalo Chac?n <chgonzalo@tutopia.com> wrote:
I have looked for by the library.
No. I don't have 'libpthread'.
Where I can get it?
What I'm trying to say, is that you don't need this library --
remove -lpthread from the compile line.

-David
--
QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

Post Reply

Return to “qdn.public.qnxrtp.devtools”