xcode3.2

Difference between writing #import <filename.h> and #import “filename.h” i.e written the file name in angular brackets and quotes? [duplicate]

隐身守侯 提交于 2019-11-28 06:31:06
问题 Possible Duplicate: what is the difference between #include <filename> and #include “filename” Difference between writing #import and #import "filename.h" i.e written the file name in angular brackets and quotes? 回答1: Quoted form This form instructs the preprocessor to look for include files in the same directory of the file that contains the #include statement, and then in the directories of any files that include (#include) that file. The preprocessor then searches along the path specified

Compile Error with: switch, “expected expression before”

早过忘川 提交于 2019-11-28 04:02:42
Cut to the chase I have recreated my problem as it is fairly self explanatory. this complies without error: switch (n) { case 1: NSLog(@""); NSString *aStr; break; default: break; } this compiles with error and it's only missing the NSLog(): switch (n) { case 1: NSString *aStr; break; default: break; } it throws an error at compile " Expected expression before 'NSString' " Am I missing something here? Dan Olson In normal C you'd have to enclose this in brackets in both cases. I suspect this may fix your problem: case 1: { NSLog(@""); NSString *aStr; break; } See this SO question for more info.

XCode Compiler Error: ld: library not found for -loauth

落爺英雄遲暮 提交于 2019-11-27 17:48:59
问题 I'm trying to use the Twitter libraries and after adding liboauth.a and adding oauthconsumeriphonelib to my header search path, I'm now down to 1 compilation error, which I can't seem to get rid of. ld: library not found for -loauth Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1 Anyone know what could be causing this? 回答1: Continuing to What Robin suggested You also need to set the Library Search Path. Right Click the Target File and