Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

2 views
Skip to first unread message

Qui...@gmail.com

unread,
Jul 20, 2008, 6:30:01 AM7/20/08
to
I have installed gcc on minix3,but when i type "gcc" or "gdb" on
shell,it says 'no such file or directory'!
Why?

lineha...@gmail.com

unread,
Jul 20, 2008, 7:09:21 AM7/20/08
to


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...

lineha...@gmail.com

unread,
Jul 20, 2008, 7:10:26 AM7/20/08
to
On Jul 20, 11:30 am, "Quic...@gmail.com" <Quic...@gmail.com> wrote:

Oops - forgot that you can also do

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

from the gcc directory.


Rgs.

Paul...

Erik van der Kouwe

unread,
Jul 20, 2008, 7:09:03 AM7/20/08
to
> 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

Qui...@gmail.com

unread,
Jul 20, 2008, 8:25:05 AM7/20/08
to
thank you all!
I understand, then i will find where is my gdb soon.

Erik van der Kouwe

unread,
Jul 20, 2008, 8:46:20 AM7/20/08
to
> 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.

Qui...@gmail.com

unread,
Jul 22, 2008, 10:40:35 PM7/22/08
to
On 7月20日, 下午8时46分, "Erik van der Kouwe" <vdkouwe <at> few.vu.nl>
wrote:

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

Erik van der Kouwe

unread,
Jul 23, 2008, 3:56:12 AM7/23/08
to
> 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).

Qui...@gmail.com

unread,
Jul 23, 2008, 12:52:17 PM7/23/08
to
On Jul 23, 3:56 pm, "Erik van der Kouwe" <vdkouwe <at> few.vu.nl>
wrote:

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.

Erik van der Kouwe

unread,
Jul 23, 2008, 3:13:00 PM7/23/08
to
> 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).

0 new messages