0

I made an app in which there is some Objective C++ files with extensions .mm and some Objective C files with extension .m.

My app runs fine until I need to add Philips HUE SDK.

When I downloaded the project I got two things: 1. HUE SDK 2. Lumberjack Folder

When I add Lumberjack folder in my app and build my project then I get errors in each and every .m files of Lumberjack.

Error I am getting:

Assigning to 'void *' from incompatible type 'const char[1]'

I tried to change the compiler as ObjectiveC and According to file type.

But still I got Error.

I also tried to add -fno-objc-arc in Lumberjack files but it also doesn't work.

Is their any way by which I can add HUE SDK in my project. I am searching for solution from long time.

EDIT

when i remove lumberjack folder i am getting this error in HUE SDK FILES

enter image description here

Sid
  • 79
  • 11

1 Answers1

2

You are apparently mixing Objective-C and Objective-C++. In C++ and Objective-C++, there is no automatic conversion from arbitrary pointer types to void*. THAT is your problem.

Removing ARC seems to fall into the category of "experimental programming". Make arbitrary, unmotivated changes to your code and hope it helps. What made you think that removing ARC would affect your code in any way?

Here's what you need to do: Find out where the "void*" and the "const char [1]" are coming from and either change one of them, or add casts to void* in your code.

gnasher729
  • 51,477
  • 5
  • 75
  • 98