Results 1 to 4 of 4

Thread: gnu help

  1. #1
    Join Date
    Jul 2013
    Beans
    10

    gnu help

    hi everyone
    I'm a newbie in ubuntu.I have installed gnustep on my ubuntu but I see problems executing my objective-c codes.What is the general command to complie an objective-c code with gnustep on ubuntu?

    TIA

  2. #2
    dino99's Avatar
    dino99 is offline Ubuntu addict and loving it
    Join Date
    Jun 2006
    Location
    Nux Jam
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

  3. #3
    Join Date
    Jul 2013
    Beans
    10

    Re: gnu help

    Thank you dino99.I tried to compile a simple hello world code.I tried compiling using " gcc `gnustep-config --objc-flags` -lgnustep-base hello.m -o hello".I then get the following errors:

    hello.m:5: error: undefined reference to 'objc_get_class'
    hello.m:5: error: undefined reference to 'objc_msg_lookup'
    hello.m:5: error: undefined reference to 'objc_msg_lookup'
    hello.m:9: error: undefined reference to 'objc_msg_lookup'
    hello.m:11: error: undefined reference to '__objc_exec_class'
    collect2: ld returned 1 exit status

    TIA

  4. #4
    Join Date
    Jul 2013
    Beans
    10

    Re: gnu help

    Hi I solved the issue using
    "gcc practice.m practicemain.m `gnustep-config --objc-flags` -lobjc -lgnustep-base -o practicemain"

    practicemain.m:file with "main" function
    practice.m:file with the implemnentation of whatever class I used

    ThankYou.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •