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?

  • >
  • -0.19.2- setup.exe
  • Then download gnostep-core-0.19.2-setup.exe
  • 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.

    1. Install gnustep-system-0.19.2-setup.exe and then install gnustep-core-0.19.2setup.exe. Do not try to set it in the exact opposite order.
    2. Now you have got gnustep for windows and to get started> All Programs> GNUstep> Shell
    3. Now open Notepad Editor and type the following code in Notepad
     #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; } 

    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

    1. Go to your shell and type the following command gcc -o Hello hello. I / GN Eustache / System / Library / Header - L / GN Eustp / System / Library / Libraries - lobjc -lgnustep-base -constant-string-class = NSConstantString
    2. This command will create a hello.exe file in your folder name folder.
    3. Re-command in shell type. /hello.exe

    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


    Comments

    Popular posts from this blog

    MySql variables and php -

    url rewriting - How to implement the returnurl like SO in PHP? -

    Which Python client library should I use for CouchdB? -