* gcc
@ 2002-06-26 7:33 Sridhar J (june end)
2002-06-26 7:48 ` gcc Joseph Jackson
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: Sridhar J (june end) @ 2002-06-26 7:33 UTC (permalink / raw)
To: linux-newbie
Hello
When I compile a C program using gcc, I get an a.out file. But when I type
a.out, the error is "No such command"
How do I execute the file?
Regards
Sridhar
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: gcc
2002-06-26 7:33 gcc Sridhar J (june end)
@ 2002-06-26 7:48 ` Joseph Jackson
2002-06-26 8:07 ` gcc Kilaru Sambaiah
` (2 subsequent siblings)
3 siblings, 0 replies; 10+ messages in thread
From: Joseph Jackson @ 2002-06-26 7:48 UTC (permalink / raw)
To: Sridhar J (june end); +Cc: linux-newbie
Sridhar J (june end) wrote:
> Hello
>
> When I compile a C program using gcc, I get an a.out file. But when I type
> a.out, the error is "No such command"
>
> How do I execute the file?
>
> Regards
> Sridhar
> -
> To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.linux-learn.org/faqs
>
>
Well what kind of file are you tring to compile? most of the time if you are
tring to compile a single source file it will be named program.c to compile it
do this
gcc program.c -o program
it tells gcc to compile program.c and that the output should be called program
which will be the binary version of that file. See how that works out for ya.
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: gcc
2002-06-26 7:33 gcc Sridhar J (june end)
2002-06-26 7:48 ` gcc Joseph Jackson
@ 2002-06-26 8:07 ` Kilaru Sambaiah
2002-06-26 13:52 ` gcc Elias Athanasopoulos
2002-06-26 12:25 ` gcc Mark Gallagher
2002-06-26 12:34 ` gcc Szekely-Benczedi Endre
3 siblings, 1 reply; 10+ messages in thread
From: Kilaru Sambaiah @ 2002-06-26 8:07 UTC (permalink / raw)
To: Sridhar J (june end), linux-newbie
On Wednesday 26 June 2002 01:03 pm, Sridhar J (june end) wrote:
> Hello
>
> When I compile a C program using gcc, I get an a.out file. But when I type
> a.out, the error is "No such command"
>
> How do I execute the file?
>
> Regards
> Sridhar
> -
pwd is not in your path. Add it. otherwise type ./a.out
sam
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: gcc
2002-06-26 7:33 gcc Sridhar J (june end)
2002-06-26 7:48 ` gcc Joseph Jackson
2002-06-26 8:07 ` gcc Kilaru Sambaiah
@ 2002-06-26 12:25 ` Mark Gallagher
2002-06-26 12:34 ` gcc Szekely-Benczedi Endre
3 siblings, 0 replies; 10+ messages in thread
From: Mark Gallagher @ 2002-06-26 12:25 UTC (permalink / raw)
To: Sridhar J (june end); +Cc: linux-newbie
Sridhar J (june end) wrote:
> Hello
>
> When I compile a C program using gcc, I get an a.out file. But when I type
> a.out, the error is "No such command"
>
> How do I execute the file?
When you type "a.out", Linux checks the various "path" directories (e.g.
"/usr/bin") for a file named "a.out". If it can't find it, then it
tells you that, well, it can't find it - that the command doesn't exist :o).
You can get around this by typing the exact path of the program. Say
a.out is located in "/home/sridhar/". You can type "~/a.out" (from
anywhere), or change to your home directory and type "./a.out".
--
Mark Gallagher
http://cyberfuddle.com/infinitebabble/
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: gcc
2002-06-26 7:33 gcc Sridhar J (june end)
` (2 preceding siblings ...)
2002-06-26 12:25 ` gcc Mark Gallagher
@ 2002-06-26 12:34 ` Szekely-Benczedi Endre
3 siblings, 0 replies; 10+ messages in thread
From: Szekely-Benczedi Endre @ 2002-06-26 12:34 UTC (permalink / raw)
To: Sridhar J (june end); +Cc: linux-newbie
./a.out maybe? To be sure you try to run it from the current
directory. I think your PATH environment varianle doesn't contains
the "." (current) directory...
Szekely-Benczedi Endre
-sysadmin
"Petru Maior" University
Targu Mures, Romania
On Wed, 26 Jun 2002, Sridhar J (june end) wrote:
> Hello
>
> When I compile a C program using gcc, I get an a.out file. But when I type
> a.out, the error is "No such command"
>
> How do I execute the file?
>
> Regards
> Sridhar
> -
> To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.linux-learn.org/faqs
>
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 10+ messages in thread
* gcc
@ 2001-09-04 21:04 David Rundle
2001-09-04 22:08 ` gcc Kurt Garloff
0 siblings, 1 reply; 10+ messages in thread
From: David Rundle @ 2001-09-04 21:04 UTC (permalink / raw)
To: kernel list
hi i need help i have a data struct that matchs some hardwear but
gcc is alignin it this meins it is out of sync whit the hardwear
like
char is 2 bytes
long double is 12 bytes
will thats what gcc thinks
so i need to tell gcc not to align the data struct
may be like
noalign struct ........
the main prob is whit long double st[8]
gcc make long double 12 bytes when it need to be 10 bytes
think you
struct _i386_fpu_st
{
long long significand;
unsigned char exponent ;
/* unsigned long test ; */
} ;
struct _i386_fpu
{
unsigned short control ;
unsigned short rev0 ;
unsigned short status ;
unsigned short rev1 ;
unsigned short tag ;
unsigned short rev2 ;
unsigned long instructionPointer ;
unsigned short instructionSelector ;
unsigned short opcode ;
unsigned long operandPointer ;
unsigned short operandSelector ;
unsigned short rev3 ;
long double st[8] ;
/* struct _i386_fpu_st st[8] ; */
unsigned long rev[400] ;
} ;
extern struct _i386_fpu * i386_fpuInit(void) ;
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: gcc
2001-09-04 21:04 gcc David Rundle
@ 2001-09-04 22:08 ` Kurt Garloff
0 siblings, 0 replies; 10+ messages in thread
From: Kurt Garloff @ 2001-09-04 22:08 UTC (permalink / raw)
To: David Rundle; +Cc: kernel list
[-- Attachment #1: Type: text/plain, Size: 720 bytes --]
On Wed, Sep 05, 2001 at 09:04:01AM +1200, David Rundle wrote:
> hi i need help i have a data struct that matchs some hardwear but
> gcc is alignin it this meins it is out of sync whit the hardwear
> like
> char is 2 bytes
> long double is 12 bytes
> will thats what gcc thinks
>
> so i need to tell gcc not to align the data struct
>
> may be like
__attribute__((packed))
Regards,
--
Kurt Garloff <kurt@garloff.de> [Eindhoven, NL]
Physics: Plasma simulations <K.Garloff@Phys.TUE.NL> [TU Eindhoven, NL]
Linux: SCSI, Security <garloff@suse.de> [SuSE Nuernberg, DE]
(See mail header or public key servers for PGP2 and GPG public keys.)
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* GCC
@ 2001-06-22 21:46 ` Steven Liu
0 siblings, 0 replies; 10+ messages in thread
From: Steven Liu @ 2001-06-22 21:46 UTC (permalink / raw)
To: linux-mips
Hi, All:
I want to get your help on GCC for Linux on Mips.
Here is some related information:
Host: i686
Red Hat linux 7.0
Binutil- 2.8.1-1.
gcc - 1.1.2-2.
linux kernel 2.2.12.
Malta Board.
CPU R3000.
Big Endian.
When I compiled the kernel with -mcpu=r3000 -mips1, it gave me the
following error.
mips-linux-gcc -D__KERNEL__ -DCONFIG_CPU_AURORA
-I/home/wenbo/linux/include -Wall -Wstrict-prototypes -O2
-fomit-frame-pointer -mmemcpy -fno-strict-aliasing -mno-split-addresses
-G 0 -mno-abicalls -fno-pic -mcpu=r3000 -mips1 -pipe -c -o init/main.o
init/main.c
/home/wenbo/linux/include/asm/atomic.h: In function `atomic_add':
In file included from /home/wenbo/linux/include/linux/fs.h:22,
from /home/wenbo/linux/include/linux/capability.h:13,
from /home/wenbo/linux/include/linux/binfmts.h:5,
from /home/wenbo/linux/include/linux/sched.h:8,
from /home/wenbo/linux/include/linux/mm.h:4,
from /home/wenbo/linux/include/linux/slab.h:14,
from /home/wenbo/linux/include/linux/malloc.h:4,
from /home/wenbo/linux/include/linux/proc_fs.h:5,
from init/main.c:23:
/home/wenbo/linux/include/asm/atomic.h:47: invalid operands to binary +
/home/wenbo/linux/include/asm/atomic.h: In function `atomic_sub':
/home/wenbo/linux/include/asm/atomic.h:57: invalid operands to binary -
/home/wenbo/linux/include/asm/atomic.h: In function `atomic_add_return':
/home/wenbo/linux/include/asm/atomic.h:67: incompatible types in
assignment
/home/wenbo/linux/include/asm/atomic.h:69: incompatible types in
assignment
/home/wenbo/linux/include/asm/atomic.h: In function `atomic_sub_return':
/home/wenbo/linux/include/asm/atomic.h:81: incompatible types in
assignment
/home/wenbo/linux/include/asm/atomic.h:83: incompatible types in
assignment
/home/wenbo/linux/include/asm/timex.h: In function `get_cycles':
In file included from /home/wenbo/linux/include/linux/timex.h:138,
from /home/wenbo/linux/include/linux/sched.h:14,
from /home/wenbo/linux/include/linux/mm.h:4,
from /home/wenbo/linux/include/linux/slab.h:14,
from /home/wenbo/linux/include/linux/malloc.h:4,
from /home/wenbo/linux/include/linux/proc_fs.h:5,
from init/main.c:23:
/home/wenbo/linux/include/asm/timex.h:41: warning: implicit declaration
of function `read_32bit_cp0_register'
/home/wenbo/linux/include/asm/timex.h:41: `CP0_COUNT' undeclared (first
use in this function)
/home/wenbo/linux/include/asm/timex.h:41: (Each undeclared identifier is
reported only once
/home/wenbo/linux/include/asm/timex.h:41: for each function it appears
in.)
make: *** [init/main.o] Error 1
Nicu met the same problem but I do not know how the problem was solved.
Thank you.
Steven Liu
^ permalink raw reply [flat|nested] 10+ messages in thread* GCC
@ 2001-06-22 21:46 ` Steven Liu
0 siblings, 0 replies; 10+ messages in thread
From: Steven Liu @ 2001-06-22 21:46 UTC (permalink / raw)
To: linux-mips
Hi, All:
I want to get your help on GCC for Linux on Mips.
Here is some related information:
Host: i686
Red Hat linux 7.0
Binutil- 2.8.1-1.
gcc - 1.1.2-2.
linux kernel 2.2.12.
Malta Board.
CPU R3000.
Big Endian.
When I compiled the kernel with -mcpu=r3000 -mips1, it gave me the
following error.
mips-linux-gcc -D__KERNEL__ -DCONFIG_CPU_AURORA
-I/home/wenbo/linux/include -Wall -Wstrict-prototypes -O2
-fomit-frame-pointer -mmemcpy -fno-strict-aliasing -mno-split-addresses
-G 0 -mno-abicalls -fno-pic -mcpu=r3000 -mips1 -pipe -c -o init/main.o
init/main.c
/home/wenbo/linux/include/asm/atomic.h: In function `atomic_add':
In file included from /home/wenbo/linux/include/linux/fs.h:22,
from /home/wenbo/linux/include/linux/capability.h:13,
from /home/wenbo/linux/include/linux/binfmts.h:5,
from /home/wenbo/linux/include/linux/sched.h:8,
from /home/wenbo/linux/include/linux/mm.h:4,
from /home/wenbo/linux/include/linux/slab.h:14,
from /home/wenbo/linux/include/linux/malloc.h:4,
from /home/wenbo/linux/include/linux/proc_fs.h:5,
from init/main.c:23:
/home/wenbo/linux/include/asm/atomic.h:47: invalid operands to binary +
/home/wenbo/linux/include/asm/atomic.h: In function `atomic_sub':
/home/wenbo/linux/include/asm/atomic.h:57: invalid operands to binary -
/home/wenbo/linux/include/asm/atomic.h: In function `atomic_add_return':
/home/wenbo/linux/include/asm/atomic.h:67: incompatible types in
assignment
/home/wenbo/linux/include/asm/atomic.h:69: incompatible types in
assignment
/home/wenbo/linux/include/asm/atomic.h: In function `atomic_sub_return':
/home/wenbo/linux/include/asm/atomic.h:81: incompatible types in
assignment
/home/wenbo/linux/include/asm/atomic.h:83: incompatible types in
assignment
/home/wenbo/linux/include/asm/timex.h: In function `get_cycles':
In file included from /home/wenbo/linux/include/linux/timex.h:138,
from /home/wenbo/linux/include/linux/sched.h:14,
from /home/wenbo/linux/include/linux/mm.h:4,
from /home/wenbo/linux/include/linux/slab.h:14,
from /home/wenbo/linux/include/linux/malloc.h:4,
from /home/wenbo/linux/include/linux/proc_fs.h:5,
from init/main.c:23:
/home/wenbo/linux/include/asm/timex.h:41: warning: implicit declaration
of function `read_32bit_cp0_register'
/home/wenbo/linux/include/asm/timex.h:41: `CP0_COUNT' undeclared (first
use in this function)
/home/wenbo/linux/include/asm/timex.h:41: (Each undeclared identifier is
reported only once
/home/wenbo/linux/include/asm/timex.h:41: for each function it appears
in.)
make: *** [init/main.o] Error 1
Nicu met the same problem but I do not know how the problem was solved.
Thank you.
Steven Liu
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2002-06-26 13:52 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-26 7:33 gcc Sridhar J (june end)
2002-06-26 7:48 ` gcc Joseph Jackson
2002-06-26 8:07 ` gcc Kilaru Sambaiah
2002-06-26 13:52 ` gcc Elias Athanasopoulos
2002-06-26 12:25 ` gcc Mark Gallagher
2002-06-26 12:34 ` gcc Szekely-Benczedi Endre
-- strict thread matches above, loose matches on Subject: below --
2001-09-04 21:04 gcc David Rundle
2001-09-04 22:08 ` gcc Kurt Garloff
2001-06-22 21:46 GCC Steven Liu
2001-06-22 21:46 ` GCC Steven Liu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.