Super Newbie C and MorphOS SDK question
  • JJ
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    JJ
    Posts: 147 from 2010/7/7
    From: Wales
    Hi All

    Trying to learn C with the C for dummies book and the MorphOS SDK.

    Entered first bit of code and try and complie and get an error about missing makefile.

    How do I create this ?

    Sorry my programming skills are in Basic only so please be gentle.

    Code below. Could be the next must have app :)


    #include <stdio.h>

    int main()
    {
    printf("goodbye, cruel world!\n);
    return(0);
    }


    [ Edited by JJ on 2010/9/2 18:21 ]
    We don't stop playing because we grow old; we grow old because we stop playing. - George Bernard Shaw


    Xbox Live: S0ulA55a551n2
  • »02.09.10 - 17:20
    Profile
  • MorphOS Developer
    stefkos
    Posts: 96 from 2004/2/4
    save this into file test.c:

    #include <stdio.h>

    int main()
    {
    printf("goodbye, cruel world!\n);
    return(0);
    }

    then in shell enter:
    gcc -noixemul test.c -o test
    after that you will find test file in same directory, you can run it:)
  • »02.09.10 - 17:26
    Profile Visit Website
  • JJ
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    JJ
    Posts: 147 from 2010/7/7
    From: Wales
    Thanks for the help.

    But why cant I do that using the compile button in ED ?

    Just trying to get an understanding
    We don't stop playing because we grow old; we grow old because we stop playing. - George Bernard Shaw


    Xbox Live: S0ulA55a551n2
  • »02.09.10 - 17:35
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Posts: 236 from 2003/7/28
    From: Canada
    I have a basic C tutorial if you want it. Send me a message if you do.
    A4000/060/PPC-200MHz, A4000T/060/PPC-233MHz, CD32, MicroA1, Pegasos 2 G4, AMD Phenom Quad Core 2.5GHz, MacMini 1.5GHz/64MB VRam...mwwmwahhh :)
  • »02.09.10 - 17:54
    Profile Visit Website
  • Moderator
    Kronos
    Posts: 2239 from 2003/2/24
    Just did a quick test and it seems that the "generate makefile" and "ceate new project" options aren't working with MorphED and the current SDK :-(

    I really hope Dietmar updates Cubic to the new IDE sometime soon....

    In the meantime you might take one of the simplier Examples, copy it somewhere else, adapt the provided makefile and replace the *.c file with your own code.

    Not very elegant, but learning makefiles is never a bad idea anyways.
  • »02.09.10 - 18:23
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Posts: 236 from 2003/7/28
    From: Canada
    Quote:


    Kronos wrote:
    Just did a quick test and it seems that the "generate makefile" and "ceate new project" options aren't working with MorphED and the current SDK :-(

    I really hope Dietmar updates Cubic to the new IDE sometime soon....

    In the meantime you might take one of the simplier Examples, copy it somewhere else, adapt the provided makefile and replace the *.c file with your own code.

    Not very elegant, but learning makefiles is never a bad idea anyways.


    Yes that would be nice if he released a new version...let's hope :)
    A4000/060/PPC-200MHz, A4000T/060/PPC-233MHz, CD32, MicroA1, Pegasos 2 G4, AMD Phenom Quad Core 2.5GHz, MacMini 1.5GHz/64MB VRam...mwwmwahhh :)
  • »02.09.10 - 18:41
    Profile Visit Website
  • Just looking around
    trehune
    Posts: 5 from 2009/3/26
    Perhaps this will help you:
    https://morph.zone/modules/newbb_plus/viewtopic.php?topic_id=7181&forum=52

    /t
  • »04.09.10 - 19:11
    Profile