Any vbcc users?
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    ausPPC
    Posts: 543 from 2007/8/6
    From: Pending...
    Other than running the install scripts for the MorphOS SDK and the vbcc binary and target archives, what else did you have to do?

    Having done this again recently, I recall that one of the vbcc install scripts prompted for an assign to include: which I attempted to make but, after a reset, was then prompted again during startup. I decided to modify the user-startup with:

    assign include: System:Development/GG/os-include

    prior to the modifications made by installing vbcc.

    I'm able to use vbcc to compile the first hello world example from the Development section of this site's library but I get a screen full of errors and warnings when trying to compile the MUI version of hello world.

    Another question... vbcc has its own include files - does it need the SDK to be installed?

    [ Edited by ausPPC 29.01.2013 - 07:56 ]
    PPC assembly ain't so bad... ;)
  • »28.01.13 - 20:55
    Profile Visit Website
  • MorphOS Developer
    geit
    Posts: 1054 from 2004/9/23
    You MUST NOT mix the includes like you did. Not by assign and not by performing a blind copy.

    VBCC is a cross compiler which also supports 68K, AROS, AmigaOS4, ... and each of these systems has its own include drawer. "vbcc:includes/includes_morphos" for example for MorphOS target.

    So if you want to merge these with the official SDK you MUST copy only headers from GG:os-include to "vbcc:includes/includes_morphos".

    BUT (big BUT) you MUST NOT copy "clib", "fd", "ppcinline","ppclib" and "proto" as those contain non vbcc and gcc specific stuff. If you need missing functions you have to use fd2pragma tool and the GG:os-include fd and clib files to generate vbcc compatible versions using the MorphOS SDK as source, but this already is not that easy and should not be required if you just start programming..

    So for a beginner it is best to just copy/update the needed files from other sub drawers like "library/mui.h" to get latest mui headers. This will avoid breaking your entire compiler set-up.

    The best why to start programming is using the gcc compiler and Scribble anyway unless you folow some tutorial which relies on VBCC.

    And of course VBCC does not need the official SDK to be installed, but you may need files from official SDK to compile existing sources from application archives. having both installed is no problem unless you copy wrong files or do wrong assigns.

    Geit



    [ Edited by geit 29.01.2013 - 00:13 ]
  • »28.01.13 - 22:03
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    ausPPC
    Posts: 543 from 2007/8/6
    From: Pending...
    Thank you for your quick and informative response. I was inspired to try programming again when I saw Krashan's custom startup article and thought of the possibilities of using some inline assembly at that point of a program. I'd like to mix C and assembler - C for easier access to MUI and assembler because I'm more comfortable with it for everything else.

    I'm still trying to get familiar with C compilers and wanted to be able to choose between gcc and vbcc to see which one suits me better and just to go through the process as a learning exercise. One thing that has confused me about vbcc is that it seems to expect there to be a pre-existing include directory somewhere despite installing its own... Next time I do a fresh install of MorphOS, I'll install vbcc before the SDK and just see what vbcc can do without it.

    [ Edited by ausPPC 29.01.2013 - 10:22 ]
    PPC assembly ain't so bad... ;)
  • »28.01.13 - 23:20
    Profile Visit Website
  • MorphOS Developer
    geit
    Posts: 1054 from 2004/9/23
    I guess the installer of VBCC will create up to date includes on its own during the installation.

    So it will copy all files you need and create the vbcc related file from fd/clib on its own.

    Installing the SDK before and point onto gg:os-iniclude when being asked is not a bad idea in the first place.

    The installation script should know that it is doing and not break anything.

    Geit
  • »29.01.13 - 08:23
    Profile
  • phx
  • Butterfly
    Butterfly
    phx
    Posts: 70 from 2005/3/29
    From: Herford, Germany
    geit wrote:

    Quote:

    So if you want to merge these with the official SDK you MUST copy only headers from GG:os-include to "vbcc:includes/includes_morphos".

    No, you must not.

    Quote:

    BUT (big BUT) you MUST NOT copy "clib", "fd", "ppcinline","ppclib" and "proto" as those contain non vbcc and gcc specific stuff

    Since when is clib and fd gcc specific?

    Quote:

    So for a beginner it is best to just copy/update the needed files from other sub drawers like "library/mui.h" to get latest mui headers. This will avoid breaking your entire compiler set-up.

    This will probably break your vbcc compiler setup.

    Again, for ausppc, do not copy anything! Install the SDK before installing vbcc. When the install script asks you where the MorphOS header files are, point it to the location of the include directory from the SDK.

    There will be an assignment called "vincludemos:", which refers to the vbcc standard headers and, using the ADD keyword, to the MOS headers.

    Quote:

    The best why to start programming is using the gcc compiler and Scribble anyway

    Really? Why? I prefer vbcc with the MorphOS-native CygnusEd.

    Quote:

    And of course VBCC does not need the official SDK to be installed

    Nonsense. If you want to call MorphOS OS functions you must install the SDK.
    But maybe vbcc support was removed from the last SDK, and I missed that? I didn't check.
  • »31.01.13 - 07:49
    Profile Visit Website
  • MorphOS Developer
    geit
    Posts: 1054 from 2004/9/23
  • »31.01.13 - 11:47
    Profile
  • phx
  • Butterfly
    Butterfly
    phx
    Posts: 70 from 2005/3/29
    From: Herford, Germany
    geit wrote:

    Quote:

    vincludemos System:vbcc/targets/ppc-morphos/include
    + System:vbcc/includes/includes_morphos

    So I need to copy MorphOS stuff. No clue why it is installed this way.

    Only because you had the strange idea to make a new directory for it.
    Just let the second path of the assignment point to the include directory in the SDK. This is especially handy when using gcc as well.

    Quote:

    I copy headers all the time, without any issue. :D

    Of course, as long as you keep your copy separate from the vbcc includes.

    Quote:

    It is enough to have the includes in place, which can be simply extracted without the need of an install.

    True. Although you often need some more files from the SDK. Like some binutils or the autodocs.
  • »31.01.13 - 13:30
    Profile Visit Website