objective c - Error With Foundation.h -
I am learning objectives in Linux (Ubuntu), but when I tried to compile my application, whose I need the Foundation headers to say there is an error in saying that the file was not found, but I have installed the GNUstep Development Package (gnustep-devel). Here is my code:
// fashion .h #import & lt; Foundation / NSObject H & gt; @Intefase fracture: nsobject {int fraction; Int begua; } - (zero) print; - (zero) setNumerator: (int) n; - (zero) SetignMinator: (Int) D; - (void fraction; - (zero) downhill; @end
And there is the console log:
ubuntu @ eeepc: ~ $ gcc main.m -o frac -lobjc file included in main .m : 3: Fraction.h: 2: 26: Error: objc / NSObject.h: No such file or directory is included in the main file: 3: Fraction.h: 4: Error: 'NOSBJX' for interface, Fracture Ubuntu @ APP Superclass: ~ $
What do I have to do? Remember one thing if you Any version you are downloading gnustep-system requires that you have to download the same version for gnustep-core. For example, if you have downloaded gnustep-setup-0.22.1-setup.exe, then you have to download Gstep-Core-0.22.1-setup.EXA otherwise your code will not run. Save it to your C: / GNUSTep / home / folder Save as hello.m Remember the name of the anonymous name when you first start the shell, make this anonymizer and make your computer Create a folder named by name in the C: / GNUstep / home folder. Do not panic then OK In the end you will be able to see the output in the shell. Conguratulation You have written your first objective, the program requires any clarification, please write to me: ayadav00009@gmail.com
#import int main (int argc, const char * argv []) {NSAutoreleasePool * pool = [[NSAutorelease Pool alloc] init]; NSLog (@ "Anil Kumar Yadav has launched the first objective program!"); [Pool drain]; Return 0; }
Comments
Post a Comment