Cubic IDE
  • Order of the Butterfly
    Order of the Butterfly
    GMKai
    Posts: 253 from 2003/4/7
    I have a problem with the gcc for morphos from CubicIDE.
    I created HelloWorld.

    #include<stdio.h>

    int main(void)
    {
    printf("Hello World");
    return 0;
    }


    The resulting .exe is failing.
    When calling gcc directly I get the following messages:

    Work:Cubic IDE/ide/devkits/compilers/gcc/morphos/2.95.3/bin> gcc Work:T/c-sources/helloworld.c -o t:hello
    gcc: installation problem, cannot exec `cpp0': No such file or directory
    gcc: installation problem, cannot exec `cc1': No such file or directory
    ld: cannot open crt0.o: No such file or directory

    What do I need to do to get a working gcc?
  • »02.11.07 - 13:55
    Profile
  • Moderator
    Kronos
    Posts: 2231 from 2003/2/24
    Cubic uses some scripts to switch between different compilers, so calling gcc without having Cubic invoked might lead to some paths not set.

    Compiling under Cubic should work out of the box, but you might want to provide extra info, like everything that was spewed into console, your compiler/linker-options (found under blue-green checkmark), did you let Cubic generate a makefile etc etc....
  • »02.11.07 - 18:14
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    GMKai
    Posts: 253 from 2003/4/7
    did install vbcc, which indeed works out of the box.

    creating and executing a makefile for gcc faills due to missing "gg:"

    will check back after reinstalling that part...again...
  • »03.11.07 - 13:59
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    GMKai
    Posts: 253 from 2003/4/7
    decided to just use vbcc.
    this works for standard c-sources.
    but when getting amiga-specific i still run into problems.

    e.g.

    given the following source:

    #include<proto/exec.h>
    #include<proto/dos.h>

    int main(void)
    {
    //?Zeiger?auf?eine?Library
    ??struct?Library?*DOSBase;

    ??//?Library??ffnen
    ??if((DOSBase?=?OpenLibrary("dos.library",0L))?!=?NULL)
    ??{
    ????//?Text?ausgeben.?L?nge:?13?Zeichen
    ????Write(Output(),?"Hello,?Amiga\n",?13);
    ????//?Library?wieder?schlie0en
    ????CloseLibrary(DOSBase);
    ??}
    return 0;
    }

    with the following command:

    vbcc:bin/vc -cpp-comments -lauto -lamiga -c -o o/vbcc-classic/main.o main.c
    >??
    error 76 in line 7 of "main.c": identifier expected
    aborting...
    unexpected end of file
    1 error found!
    vbccppc failed returncode 20
    vbccppc -quiet "main.c" -o= "T:t_135024036_0.asm" -cpp-comments -c99 -elf -no-regnames -no-multiple-ccs -madd -no-align-args -use-commons -O=1 -Ivincludemos: -D__MORPHOS__ -D__MORPHOS_NODIRECTCALL failed
    make: *** [o/vbcc-classic/main.o] Error 20

    makefile looks like this:

    # makefile for GNU make (automatically generated by makemake)
    # NOTE: indent with TAB in GNU makefiles!

    # paths are relative to the project directory (current directory during make)

    EXE = bin/vbcc-classic/helloworld
    OBJDIR = o/vbcc-classic/

    # compiler and linker

    CC = vbcc:bin/vc
    LD = vbcc:bin/vc

    # target 'all' (default target)

    all : $(EXE)

    $(OBJDIR)main.o : main.c
    $(CC) $(shell vbccprefs) -c -o $(OBJDIR)main.o main.c

    OBJS = $(OBJDIR)main.o

    $(EXE) : $(OBJS)
    $(LD) $(shell vbccprefs) -o $(EXE) $(OBJS)

    # target 'clean'

    clean:
    -delete $(EXE)
    -delete $(OBJDIR)\*.o
  • »04.11.07 - 13:06
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Wishmaster
    Posts: 342 from 2003/6/29
    #include<exec/exec.h>
    #include<dos/dos.h>

    fehlt ja auch.
    Pegasos PPC
  • »04.11.07 - 14:14
    Profile
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Dietmar
    Posts: 114 from 2003/2/26
    From: Aachen, Germany
    > calling gcc without having Cubic invoked might lead to some paths not set

    Compilers can be used without Cubic. ccselect runs during user-startup and activates the last compiler that was in use (including setting the assigns). It activates the last compiler that was installed if Cubic was never started. Since all compilers on the CD run under MorphoS, the problem should have a different cause. Maybe the gcc installation has been corrupted. I'd recommend to run Cubic setup and let it re-install the C/C++ add-on.

    Tip: When using a Cubic compiler installation without Cubic, run the ccselect program to select a gcc: ccselect <alias> (compiler alias as in devkits:devkits.config, for example: ccselect gcc/morphos/stable). If you use makefiles, add the ccselect line to the makefile to be sure that the correct gcc is used.
  • »04.11.07 - 16:06
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    GMKai
    Posts: 253 from 2003/4/7
    I did a complete reinstall of Cubic.
    I can compile simple simple ansi-c-sources with gcc and vbcc.
    But I can use make only once.
    When calling make a second time it doesn't do anything. After a reboot it is working again.
    What system-component might be broken if things like make work only once?


    @Dietmar: would you mind checking your domain as it isn't working here since a few days?
  • »07.11.07 - 11:00
    Profile
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Dietmar
    Posts: 114 from 2003/2/26
    From: Aachen, Germany
    > What system-component might be broken if things like make work only once?

    Not enough information. What step fails, what is the error message, what can you see in snoopdos, any hits? It could be anything: a bug in some component (e.g. corrupted memory), not enough memory or memory fragmentation, a rogue patch or commodity related to paths/assigns etc. Are there any lines in user-startup from non-Cubic compiler installations, e.g. commands to make gcc resident? If so, remove them. For any further support in this matter, please use private mail.

    > would you mind checking your domain as it isn't working here since a few days?

    The server was turned off a week ago - sorry (and the owner of the domain put it up for sale withouth notifying me). I'm uploading to a free hoster as temporary solution. The URL will be posted shortly. There will be a small discount on the opening day to apologize for the inconvenience.
  • »07.11.07 - 11:56
    Profile Visit Website
  • Just looking around
    morgoth6
    Posts: 1 from 2007/11/7
    I had some troubles with e-mail contact can you take a look at my PM ?
  • »07.11.07 - 20:57
    Profile Visit Website
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Dietmar
    Posts: 114 from 2003/2/26
    From: Aachen, Germany
    Cubic web site moved to new location:

    The Cubic site can now be reached at http://developers.xoomwebs.com (this is only a temporary site on a free hosting service to deal with the loss of the previous server).

    The opening day special is a discount for the Cubic development package.
  • »08.11.07 - 01:29
    Profile Visit Website