After you overcome pthread related problem, you will encounter a problem when
you do "make" in resource/example folder to build examples.
The problem is
make[1]: Leaving directory '/home/kishore/iot/iotivity-0.9.0/resource'
g++ -O3 -std=c++0x -Wall -pthread -o release/simpleserver simpleserver.cpp
-I../include/ -I../oc_logger/include -I../csdk/stack/include
-I../csdk/ocsocket/include -I../csdk/ocrandom/include -I../csdk/logger/include
-I../csdk/libcoap ../release/obj/liboc.a ../csdk/linux/release/liboctbstack.a
../oc_logger/lib/oc_logger.a
g++: error: ../oc_logger/lib/oc_logger.a: No such file or directory
makefile:65: recipe for target 'simpleserver' failed
make: *** [simpleserver] Error 1
You should go to resource/oc_logger and "make" in that folder to generate
oc_logger.a
go back to resource/example and continue "make".
________________________________
From: Krishna Kishore
Sent: Saturday, February 21, 2015 10:01 PM
To: Mike IoT; iotivity-dev at lists.iotivity.org
Subject: RE: [dev] help: ocicuc sample compile error
Hi,
There is need of -lpthread while building client.
I overcame this error by including following in
resource/examples/ocicuc/SConscript
ocicuc_env.AppendUnique(LIBS = ['pthread'])
Ofcourse, this has to be added conditionally. For example, for android
-lpthread should not be included.
Regards,
Kishore
________________________________
From: iotivity-dev-bounces at lists.iotivity.org [iotivity-dev-bounces at
lists.iotivity.org] on behalf of Mike IoT [[email protected]]
Sent: Saturday, February 21, 2015 5:11 PM
To: iotivity-dev at lists.iotivity.org
Subject: [dev] help: ocicuc sample compile error
Hi
I faced the following error. If someone help me, I appreciate it.
g++ -o out/linux/x86_64/release/resource/examples/ocicuc/client -s -m64
out/linux/x86_64/release/resource/examples/ocicuc/client.o
out/linux/x86_64/release/resource/examples/ocicuc/driver.o
out/linux/x86_64/release/resource/examples/ocicuc/utility.o
-Lout/linux/x86_64/release -L. -loc -loctbstack -lcoap -loc_logger
-lboost_program_options
out/linux/x86_64/release/liboc.so: undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
scons: *** [out/linux/x86_64/release/resource/examples/ocicuc/client] Error 1
________________________________
SASKEN BUSINESS DISCLAIMER: This message may contain confidential, proprietary
or legally privileged information. In case you are not the original intended
Recipient of the message, you must not, directly or indirectly, use, disclose,
distribute, print, or copy any part of this message and you are requested to
delete it and inform the sender. Any views expressed in this message are those
of the individual sender unless otherwise stated. Nothing contained in this
message shall be construed as an offer or acceptance of any offer by Sasken
Communication Technologies Limited ("Sasken") unless sent with that express
intent and with due authority of Sasken. Sasken has taken enough precautions to
prevent the spread of viruses. However the company accepts no liability for any
damage caused by any virus transmitted by this email.
Read Disclaimer at http://www.sasken.com/extras/mail_disclaimer.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20150221/418df5e8/attachment.html>