John, you can run "Scons ..." from the top directory of IoTivity.
The script isn't normative. You can also change:
OIC_LIBS_PATH = '../../out/linux/x86_64/release'
To
OIC_LIBS_PATH = env.get('BUILD_DIR')
I'd like take this opportunity to remind all, it is recommended to have a look
scons_script_how_to.txt before write
a scons build script for IoTivity. Please follow the basic rules. Otherwise it
is quite possible introduce some potential trouble.
It isn't recommended to add SConstruct for a sub-project, if do like this,
there will be at least follow three problems:
1) The project won't be build when run Scons from the top directory of
IoTivity source code
2) The dependent libraries must been built in advance.
3) The output of the build may not be put in proper directory.
Regards,
Caiwen
From: iotivity-dev-bounces at lists.iotivity.org
[mailto:[email protected]] On Behalf Of Light, John J
Sent: Wednesday, April 29, 2015 11:34 PM
To: iotivity-dev at lists.iotivity.org
Subject: [dev] master fails to build for me
I get
Linking out/linux/x86_64/debug/examples/OICMiddle/OICMiddle
out/linux/x86_64/debug/libconnectivity_abstraction.a(caprotocolmessage.o): In
function `CAParsePDU':
/home/john/oic/iotivity/resource/csdk/connectivity/src/caprotocolmessage.c:201:
undefined reference to `coap_new_pdu'
out/linux/x86_64/debug/libconnectivity_abstraction.a(caprotocolmessage.o): In
function `CAGeneratePDUImpl':
/home/john/oic/iotivity/resource/csdk/connectivity/src/caprotocolmessage.c:229:
undefined reference to `coap_new_pdu'
collect2: error: ld returned 1 exit status
scons: *** [out/linux/x86_64/debug/examples/OICMiddle/OICMiddle] Error 1
scons: building terminated because of errors.
The problem appears to be this line in its SConstruct:
OIC_LIBS_PATH = '../../out/linux/x86_64/release'
since I am building the debug version. How do I get it to use the appropriate
libraries instead of the release libraries?
New to scons. Even though I wrote OICMiddle, somebody else wrote the
SConstruct and SConstruct files in the directory. Why both?
John Light
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20150430/a693e8b3/attachment.html>