As like done in Tizen platform.
DLOG_ prefix looks best way to do.
#ifdef __TIZEN__
typedef enum {
DEBUG = DLOG_DEBUG,
INFO = DLOG_INFO,
WARNING = DLOG_WARN,
ERROR = DLOG_ERROR,
FATAL = DLOG_ERROR
} LogLevel;
#else
typedef enum
{
DEBUG = 0, INFO, WARNING, ERROR, FATAL
} LogLevel;
#endif
Temporary you can switch code for iOS build as like this definition.
However, holistic perspective duplication need to be avoid changing enum as
like this.
BR, Uze Choi
-----Original Message-----
From: iotivity-dev-bounces at lists.iotivity.org
[mailto:[email protected]] On Behalf Of Chang, Gene
Sent: Tuesday, April 05, 2016 5:19 AM
To: iotivity-dev at lists.iotivity.org
Subject: [dev] Error using CSDK logger in objective-C
I am working on using iotivity for Mac and iOS and am having a compile problem
using logger.h. I?m trying to use the rdpayload.h headers to do some cbor
processing in an objective-C SDK. It looks like the problem I?m running into
is in the LogLevel enum DEBUG declaration.
I think the problem is that on Xcode for Mac/iOS (and probably also VS for
windows) DEBUG is already #defined and is causing a conflict in the global
namespace for the Iotivity CSDK. Has there been any thought to prefixing the
enum declarations to prevent namespace conflicts?
Thanks.
Gene Chang
Support and Enablement Lead
Intel
gene.chang at intel.com<mailto:gene.chang at intel.com>
This e-mail and any attachments are confidential and may be subject to legal or
some other professional privilege. They are intended solely for the attention
and use of the named addressee(s).
If you are not the named addressee(s) you must not use, disclose, retain or
reproduce all or any part of the information contained in this e-mail or any
attachments.
Any unauthorized use or disclosure may be unlawful. If you have received this
e-mail by mistake, please inform the sender immediately and delete it and all
copies from your system and destroy any hard copies of it.
_______________________________________________
iotivity-dev mailing list
iotivity-dev at lists.iotivity.org
https://lists.iotivity.org/mailman/listinfo/iotivity-dev