Selbst erstellte Objective C Source files wie compilieren?

firefoxuser

firefoxuser

Aktives Mitglied
Thread Starter
Dabei seit
27.04.2005
Beiträge
450
Reaktionspunkte
1
Hallo,
Sagen wir mal ich habe zwei von einem anderen Programm erstellten source files test.h und test.m.
Wenn ich jetzt test.m in Xcode kompiliere pasiert gar nichts bzw. kann ich nicht kompilieren, da im "Build" menü alles ausgegraut ist.
Mach ich jetzt im terminal $ gcc test.m kommt
In file included from test.m:11:
test.h:23: error: statically allocated instance of Objective-C class 'NSString'
test.h:24: error: statically allocated instance of Objective-C class 'NSDate'
test.h:25: error: statically allocated instance of Objective-C class 'NSString'
test.h:31: error: can not use an object as parameter to a method
test.m:53: error: can not use an object as parameter to a method

Wie kann ich jetzt Objective C source files compilieren die NS* Objecte benutzen, ohne ein Xcode project zu erstellen?
Ich hab auch in die test.h datei #import <Cocoa/Cocoa.h> reingeschrieben
Danke!
 
Zuletzt bearbeitet:
Zurück
Oben Unten