Help newer! I have installed gcc and gdb but it doesn't work. - Minix

This is a discussion on Help newer! I have installed gcc and gdb but it doesn't work. - Minix ; I have installed gcc on minix3,but when i type "gcc" or "gdb" on shell,it says 'no such file or directory'! Why?...

+ Reply to Thread
Results 1 to 10 of 10

Thread: Help newer! I have installed gcc and gdb but it doesn't work.

  1. Help newer! I have installed gcc and gdb but it doesn't work.

    I have installed gcc on minix3,but when i type "gcc" or "gdb" on
    shell,it says 'no such file or directory'!
    Why?

  2. Re: Help newer! I have installed gcc and gdb but it doesn't work.

    > I have installed gcc on minix3,but when i type "gcc" or "gdb" on
    > shell,it says 'no such file or directory'!
    > Why?


    Because they are not in your $PATH. Try adding /usr/gnu/bin, either to
    the filenames or to $PATH.

    --
    With kind regards,
    Erik van der Kouwe

  3. Re: Help newer! I have installed gcc and gdb but it doesn't work.



    On Jul 20, 11:30 am, "Quic...@gmail.com" wrote:


    > I have installed gcc on minix3,but when i type "gcc" or "gdb" on
    > shell,it says 'no such file or directory'!
    > Why?



    Is the gcc binary in your path?

    Do something like

    -------------
    # PATH=.:$PATH
    --------------

    When you are in the gcc binary directory. You should now
    be able to run gcc from the gcc binary directory.

    This is not ideal - you really want something like

    ---------------
    #PATH=/path/to/gcc/bin:$PATH
    ------------------

    to run it from anywhere.

    Put this in your .profile if you want to make the change permanent.

    HTH.


    Rgs.


    Paul...


  4. Re: Help newer! I have installed gcc and gdb but it doesn't work.

    On Jul 20, 11:30 am, "Quic...@gmail.com" wrote:
    > I have installed gcc on minix3,but when i type "gcc" or "gdb" on
    > shell,it says 'no such file or directory'!
    > Why?


    Oops - forgot that you can also do

    -------
    # ./gcc myfile.c
    ---------

    from the gcc directory.


    Rgs.

    Paul...


  5. Re: Help newer! I have installed gcc and gdb but it doesn't work.

    thank you all!
    I understand, then i will find where is my gdb soon.

  6. Re: Help newer! I have installed gcc and gdb but it doesn't work.

    > I understand, then i will find where is my gdb soon.

    No, unfortunately you won't. gdb has not been ported to Minix (AFAIK),
    so you'll need to use mdb for debugging. Unfortunately this program is
    quite Spartan and incapable of reading symbol tables produced by gcc.

    --
    With kind regards,
    Erik van der Kouwe

  7. Re: Help newer! I have installed gcc and gdb but it doesn't work.

    On 7月20日, 下午8时46分, "Erik van der Kouwe" few.vu.nl>
    wrote:
    > > I understand, then i will find where is my gdb soon.

    >
    > No, unfortunately you won't. gdb has not been ported to Minix (AFAIK),
    > so you'll need to use mdb for debugging. Unfortunately this program is
    > quite Spartan and incapable of reading symbol tables produced by gcc.
    >
    > --
    > With kind regards,
    > Erik van der Kouwe


    That means i install gcc unnecessary?
    I 'm not familiar mdb. Is mdb also powerful and easy to use?

  8. Re: Help newer! I have installed gcc and gdb but it doesn't work.

    > That means i install gcc unnecessary?
    > I 'm not familiar mdb. Is mdb also powerful and easy to use?


    If you only care about GDB then indeed there is no point in installing
    GCC. MDB is not easy to use, especially if it cannot read your symbol
    tables (which is the case with binaries created with GCC).

    --
    With kind regards,
    Erik van der Kouwe

  9. Re: Help newer! I have installed gcc and gdb but it doesn't work.

    On Jul 23, 3:56*pm, "Erik van der Kouwe" few.vu.nl>
    wrote:
    > > That means i install gcc unnecessary?
    > > I 'm not familiar mdb. Is mdb also powerful and easy to use?

    >
    > If you only care about GDB then indeed there is no point in installing
    > GCC. MDB is not easy to use, especially if it cannot read your symbol
    > tables (which is the case with binaries created with GCC).
    >
    > --
    > With kind regards,
    > Erik van der Kouwe


    I think i am the man only care about GDB. If that so i give up gcc.
    How to debug my c code on minix? use another software in your
    opionion?
    please tell me the c compiler and debuger,Are there any tutorials?
    Thanks a lot.

  10. Re: Help newer! I have installed gcc and gdb but it doesn't work.

    > I think i am the man only care about GDB. If that so i give up gcc.
    > How to debug my c code on minix? use another software in your
    > opionion?
    > please tell me the c compiler and debuger,Are there any tutorials?


    AFAIK there is no easy-to-use debugger on Minix. When debugging code on
    Minix I would generally use functions like printf and assert. If a
    really need a debugger, for example for analyzing a core dump, I use
    mdb; although not easy to use but it is better than nothing.

    The C compilers are ACK (the default compiler, named cc) and GCC (which
    you have installed). It is generally recommendable to use the former
    unless you need specific GCC features.

    I do not know of any ACK documentation besides its man pages, but you
    generally wouldn't need it because it offers few features besides the
    standards. Very complete documentation for GCC is found on the internet
    (Google is your friend here).

    Any tutorial on POSIX programming will do (again, Google is your
    friend).

    --
    With kind regards,
    Erik van der Kouwe

+ Reply to Thread