iphone error: expected '=', ',', ';', 'asm' or '__attribute__' before ' 'foo'

前端 未结 6 1521
忘掉有多难
忘掉有多难 2020-11-28 10:45

I\'m trying to port the speakhere example into another app and I\'m having issues. I copied all the files, and all the frameworks, but for some reason I get a bunch of comp

6条回答
  •  醉酒成梦
    2020-11-28 11:06

    Your problem is that you are compiling SpeakHerePortAppDelegate.m, which is an Objective C file, but it is indirectly including MeterTable.h which is a C++ header file.

    Rename it to SpeakHerePortAppDelegate.mm (double m) so that it is compiled as Objective C++ and your problem is resolved.

    Name all your files .mm and then all your code will be compiled as Objective C++

提交回复
热议问题