我不断收到以下代码的错误信息。可以任何人告诉我如何解决这个错误。
在.h文件中
#ifdef __cplusplus
namespace tesseract {
class TessBaseAPI;
};
#endif
内部@interface
abc
tesseract::TessBaseAPI *tesseract;
uint32_t *pixels;
错误行tesseract::TessBaseAPI *tesseract;
我已将基本SDK设置为5.0,而我的Xcode
版本为4.5。此外,我已将.m
更改为.mm
文件扩展名。
CompileC /Users/XXXX/Library/Developer/Xcode/DerivedData/XXXCard-bfzxfmheqnrlwnfvttodjyxemqxo/Build/Intermediates/XXXX.build/Debug-iphoneos/mBizCard.build/Objects-normal/armv7/ViewController.o mBizCard/ViewController.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/XXXXXXXX/trunk
setenv LANG en_US.US-ASCII
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch armv7 -fmessage-length=0 -std=gnu99 -fobjc-arc -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wreturn-type -Wno-implicit-atomic-properties -Wno-receiver-is-weak -Wduplicate-method-match -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -DDEBUG=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk -Wprotocol -Wdeprecated-declarations -g -Wno-sign-conversion "-DIBOutlet=__attribute__((iboutlet))" "-DIBOutletCollection(ClassName)=__attribute__((iboutletcollection(ClassName)))" "-DIBAction=void)__attribute__((ibaction)" -miphoneos-version-min=5.1 -iquote
ViewController.h中包含的文件:24:5:error: type name requires a specifier or qualifier
tesseract::TessBaseAPI *tesseract;
^
ViewController.h:24:15:error: expected expression
tesseract::TessBaseAPI *tesseract;
^
ViewController.h:24:5:warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
tesseract::TessBaseAPI *tesseract;
^ ~~~~~~~~
1 warning and 2 errors generated.