clang -O3 -framework CoreServices -framework Foundation osx-dictionary.m -o osx-dictionary-cli
osx-dictionary.m:19:21: warning: receiver 'NSString' is a forward class and corresponding @interface may not exist [-Wreceiver-forward-class]
NSString* word = [NSString stringWithUTF8String:searchword];
^~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:260:8: note: forward declaration of class here
@class NSString;
^
osx-dictionary.m:19:30: warning: class method '+stringWithUTF8String:' not found (return type defaults to 'id') [-Wobjc-method-access]
NSString* word = [NSString stringWithUTF8String:searchword];
^~~~~~~~~~~~~~~~~~~~
osx-dictionary.m:21:64: warning: instance method '-length' not found (return type defaults to 'id') [-Wobjc-method-access]
CFRangeMake(0, [word length]));
^~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:260:8: note: receiver is instance of class declared here
@class NSString;
^
osx-dictionary.m:21:58: error: incompatible pointer to integer conversion passing 'id' to parameter of type 'CFIndex' (aka 'long') [-Wint-conversion]
CFRangeMake(0, [word length]));
^~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:530:52: note: passing argument to parameter 'len' here
CF_INLINE CFRange CFRangeMake(CFIndex loc, CFIndex len) {
^
osx-dictionary.m:83:28: warning: instance method '-UTF8String' not found (return type defaults to 'id') [-Wobjc-method-access]
char* r = (char*)[result UTF8String];
^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:260:8: note: receiver is instance of class declared here
@class NSString;
^
4 warnings and 1 error generated.