Coding 4 MOS
  • Order of the Butterfly
    Order of the Butterfly
    maurensen
    Posts: 358 from 2003/10/3
    From: Padova - Italy
    Now that my MOS system is configured (thanks to help of the guys @ Mzone :-) ofcourse!), I'd like to try writing some little proggies.
    I know some languages (a little bit of Java & C, 68k asm, Basic, Cobol...) but I'm absolutely new about gcc that seems to be the standard tool to write applications for MOS.
    Could someone please tell me some links where I can find a nice guide for an absolute beginner?
    Looking @ MOS SDK it's a little bit confusing for me, there are very little help files for a lame like me :-). It's all a little bit too Unixish :-)
    Thanks and Ciao!!
    -------------------
  • »20.04.04 - 10:02
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Wishmaster
    Posts: 342 from 2003/6/29
    Look at GG:guide/gcc.guide,
    here: http://mdc.morphos.net/
    and the Commodore Autodocs and RKRM's are mandatory.

    For compilation simply type "gcc -noixemul hello.c -o hello" for instance.
    Pegasos PPC
  • »20.04.04 - 10:10
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Zylesea
    Posts: 2053 from 2003/6/4
    If you're thinking of C++ instead of C (I guess since you know Java, you will favour C++), the g++ within the sdk is broken and must be replaced with the files of an older (?) gcc/g++ package.
    Somewhere on mdc.morphos.net it is described but speaking of myself I've been too lazy to check it out yet, I just checked that g++ is broken (shame onme that I am so lazy...).
    --
    http://via.bckrs.de

    Whenever you're sad just remember the world is 4.543 billion years old and you somehow managed to exist at the same time as David Bowie.
    ...and Matthias , my friend - RIP
  • »20.04.04 - 10:49
    Profile Visit Website
  • Cocoon
    Cocoon
    smithy
    Posts: 49 from 2003/12/30
    From: Tyneside, England
    Quote:

    C is better anyway.


    C is backward!

    I'm coding something rather cool, and I'm doing it in C++ on Windows (I've written myself a simple SAL) but I'll be wanting to try some stuff out in MOS soon, so does anyone know where this working C++ compiler is for MOS?

    Cheers, Smithy
  • »20.04.04 - 15:51
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Zylesea
    Posts: 2053 from 2003/6/4
    Quote:


    smithy wrote:
    Quote:

    C is better anyway.


    C is backward!

    I'm coding something rather cool, and I'm doing it in C++ on Windows (I've written myself a simple SAL) but I'll be wanting to try some stuff out in MOS soon, so does anyone know where this working C++ compiler is for MOS?

    Cheers, Smithy




    http://www.neoscientists.org/~bifat/binarydistillery/

    should do the trick. but as i said already i haven't checked it out yet myself (should take this as an opportunity to do it now...)
    --
    http://via.bckrs.de

    Whenever you're sad just remember the world is 4.543 billion years old and you somehow managed to exist at the same time as David Bowie.
    ...and Matthias , my friend - RIP
  • »20.04.04 - 16:06
    Profile Visit Website
  • Cocoon
    Cocoon
    smithy
    Posts: 49 from 2003/12/30
    From: Tyneside, England
    Quote:

    http://www.neoscientists.org/~bifat/binarydistillery/


    Hi Zylesea,

    I might be being thick or missing something obvious, but I can't find anything related to a C++ compiler on the above page!
  • »20.04.04 - 17:11
    Profile
  • Cocoon
    Cocoon
    smithy
    Posts: 49 from 2003/12/30
    From: Tyneside, England
    On this page https://morph.zone/modules/MorphOS/development.php it has a link to the Geekgadgets stuff for PPC. I vaguely recall reading somewhere that C++ works with the GeekGadgets files, but the link on there is broken.

    Argh!! Is there a working C++ compiler anywhere for MorphOS?!!?
  • »20.04.04 - 17:23
    Profile
  • MorphOS Developer
    itix
    Posts: 1516 from 2003/2/24
    From: Finland
    The g++ within the SDK works but it just wont compile everything (can't remember which things were broken).
    1 + 1 = 3 with very large values of 1
  • »20.04.04 - 18:58
    Profile
  • Fab
  • MorphOS Developer
    Fab
    Posts: 1331 from 2003/6/16
    With the link i mentioned on the other thread, stl stuff (heavily using templates) seems to work.
    At least I could use vector list and string classes and some algorithms without any problem.
  • »20.04.04 - 20:42
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    dholm
    Posts: 296 from 2003/9/1
    From: Malmo, Sweden
    That sounds great, I have to try that one. Too bad GCC does not come with a working hash_map though, and STLPort requires GCC 3. Still, if it works with the GCC STL implementation it should be pretty useful.
  • »20.04.04 - 20:49
    Profile Visit Website
  • MorphOS Developer
    kiero
    Posts: 129 from 2003/2/28
    templates and all work fine. You just need another C++ (from CISC). Just ask on MDC or on #morphos.

    PS. somebody definetely should put some info somewhere about that.
  • »20.04.04 - 22:15
    Profile Visit Website
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Zylesea
    Posts: 2053 from 2003/6/4
    Quote:


    itix wrote:
    The g++ within the SDK works but it just wont compile everything (can't remember which things were broken).



    I would call a g++ which is not able to use <iostream.h> seriously broken.
    Well, have to try it with Cisc's Version

    /me wonders why that file is not added to mdc as well. Or some kind of "official" hint how to get a proper g++.

    @ Tui

    Took a wrong link :-(
    --
    http://via.bckrs.de

    Whenever you're sad just remember the world is 4.543 billion years old and you somehow managed to exist at the same time as David Bowie.
    ...and Matthias , my friend - RIP
  • »21.04.04 - 12:19
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    dholm
    Posts: 296 from 2003/9/1
    From: Malmo, Sweden
    I think 2.95 follows the old standard but the new one dictates that you should use <iostream> and not <iostream.h>. The compiler should give you a warning if you use the old .h-style.
    Everything in iostream, STL etc should also bee in the namespace "std" because it is included in the official C++ standard.
  • »21.04.04 - 12:50
    Profile Visit Website
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Zylesea
    Posts: 2053 from 2003/6/4
    I know that there is this new standard which cancels out the ".h" extension. But the sdk g++ fails not on "iostrem.h" or just "iostream" but on both. It's not capable of opening the c++ includes. Some softlink/assign (??? - whatever, i am not an expert in these things..) or so is broken, i don't know. currently i don't sit in front of my Peg so i can't check the error message.
    The sdk as is comes just doesn't support C++ correctly. But it seems that Cisc's version does so and i will try it somewhen these days.
    --
    http://via.bckrs.de

    Whenever you're sad just remember the world is 4.543 billion years old and you somehow managed to exist at the same time as David Bowie.
    ...and Matthias , my friend - RIP
  • »21.04.04 - 13:04
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    dholm
    Posts: 296 from 2003/9/1
    From: Malmo, Sweden
    Ok, I understand. I will try it as well as soon as I have time to boot into MorphOS. I think the iostream-includes are supposed to be in /gg/lib/gcc-lib/powerpc-morphos/2.95.3/include/g++ or something similar to that. Unless they have configured GCC to keep them in a non-standard directory.
  • »21.04.04 - 13:11
    Profile Visit Website
  • Fab
  • MorphOS Developer
    Fab
    Posts: 1331 from 2003/6/16
    Quote:


    I know that there is this new standard which cancels out the ".h" extension. But the sdk g++ fails not on "iostrem.h" or just "iostream" but on both. It's not capable of opening the c++ includes. Some softlink/assign (??? - whatever, i am not an expert in these things..) or so is broken, i don't know. currently i don't sit in front of my Peg so i can't check the error message.
    The sdk as is comes just doesn't support C++ correctly. But it seems that Cisc's version does so and i will try it somewhen these days.



    I don't remember that the sdk's gcc had this problem. Anyway, with Cisc's gcc, both inclusion standards work.
  • »21.04.04 - 13:19
    Profile Visit Website
  • Paladin of the Pegasos
    Paladin of the Pegasos
    poundsmack
    Posts: 1346 from 2003/6/8
    From: USA California
    GCC 3.4 just got released for linux and it is a huge improvment in speed and stability....
    "Poundsmack, official morphzone thread creator" -LorD
    "Wanna be lord of the avatars." -JKD
  • »21.04.04 - 13:39
    Profile Visit Website