Qtopia-interest Archive, December 2006
Re: Using pthreads in qtopia-2.1.1
Message 1 in thread
Sorry, I mistyped. its really this:
LIBS += -lpthread
harshavardhanreddy mandeepala wrote:
> Dear Potter,
>
> Thanks for ur reply.
> I did the following.
> export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib
>
> In usr/lib libpthread is there in my system.
>
> And in project file i added
>
> LIBS += pthread //Also tried LIBS += lpthread
>
> But when i do make it is displaying
> g++: pthread: No such file or directory //g++: lpthread: No such file
> or directory.
>
> What about header files it will automatically finds or we have to give
> the path?
>
>
> Once again Thanks for ur reply,
>
> Regards,
> Harsha
>
>
>
> On 11/28/06, Lorn Potter <lpotter@xxxxxxxxxxxxx> wrote:
>> Try adding
>> LIBS += pthread
>>
>> to your .pro file
>>
>>
>>
>> harshavardhanreddy mandeepala wrote:
>> > Hi All,
>> > I am using qtopia-2.1.1 .
>> > As everybody knows that it won't support Pthreads so I wanted to use
>> > linux Pthreads.
>> >
>> > In my *.cpp file i included
>> >
>> > #include <usb.h>
>> > #include <pthread.h>
>> >
>> > And i used some of the API's like
>> > pthread_create(), usb_bulk_read().
>> >
>> > But when i compile the application using qmake it is giving the
>> > error as undefined reference to pthread_create() .....
>> > Do i need to modify my *.pro file to find the usb.h and pthread.h
>> files.
>> >
>> > The following is my project file. usb.h is there in /usr/include/usb.h.
>> > How can i link this file to here.
>> > Also for pthread we may have to link libpthread library.How can i link
>> > this library here?
>> >
>> >
>> >
>> > ######################################################################
>> > # Automatically generated by qmake (1.06c-Qtopia) Tue Nov 28
>> 13:08:43 2006
>> > ######################################################################
>> >
>> > TEMPLATE = app
>> > INCLUDEPATH += .
>> >
>> > # Input
>> > HEADERS += ANS_Protocol.h \
>> > ANSILog.h \
>> > ANSIs.h \
>> > ANSiscope_PatientInfoImpl.h \
>> > Main_ProcessingImpl.h \
>> > SerialComm.h
>> > INTERFACES += ANSiscope_PatientInfo.ui Main_Processing.ui
>> > SOURCES += ANS_Protocol.cpp \
>> > ANSILog.cpp \
>> > ANSiscope.cpp \
>> > ANSiscope_PatientInfoImpl.cpp \
>> > Main_ProcessingImpl.cpp \
>> > SerialComm.cpp
>> > TARGET = CANSiscope
>> >
>> >
>> >
>> >
>> > Thanks in advance.
>> >
>> > Regards,
>> > Harsha
>> >
>> > --
>> > To unsubscribe - send "unsubscribe" in the subject to
>> > qtopia-interest-request@xxxxxxxxxxxxx
>> >
>> >
>>
>
> --
> To unsubscribe - send "unsubscribe" in the subject to
> qtopia-interest-request@xxxxxxxxxxxxx
>
>
--
[ signature omitted ]