[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: the weird problem
- From: Rick Stevens <rstevens vitalstream com>
- To: redhat-install-list redhat com
- Subject: Re: the weird problem
- Date: Wed, 30 Oct 2002 09:08:20 -0800
Harry Keller wrote:
Actually, I have often created test routines called test from test.c. As
long as you invoke by ./test, it's ok. I tried your test exactly as you
wrote it. I wouldn't compile with gcc on RH7.3 because it didn't like the
void return type. When I changed the program as follows, everything worked.
test.c:
main() { printf( "test\n" }
$gcc -o test test.c
$./test
test
The "void" data type is perfectly valid. However, BY DEFINITION the
"main()" function returns integer. The prototype defined in the system
headers and such is "int main(int argc, char **argv);". You can NOT
change it. This has been true since C was invented in the 70s.
----- Original Message -----
From: "Rokicki, Andrew" <ARokicki US TIAuto com>
To: <redhat-install-list redhat com>
Cc: <thenightmare555 yahoo com>
Sent: Wednesday, October 30, 2002 6:15 AM
Subject: RE: the weird problem
(For some reason it takes forever for my responses to make it to the
actual
list.
so I am emailing you directly.)
You can not create test program name.
It is a shell command.
Try calling it mytest or whatever (OK call it whatever).
try this gcc -o whatever test.c
make sure you have correct permissions set.
Such as x for you this means it is executable.
On Wednesday, October 30, 2002 8:57 AM, nobody somebody
[SMTP:thenightmare555 yahoo com] wrote:
Look folks...
I have one Intel Pentium IV processor with 128mb of ram ...
I've installed redhat 8.0 and I have one weird problem....
I created a file called test.c --->
#include <stdio.h>
void main()
{
printf("test");
}
[root localhost]#gcc -o test test.c
[root localhost]# /test
[root localhost]#
so I can compile it succesfuly ....
but I can't run ne binary file
c00L_3oy
ps. I hope you can help me
_____
Do you Yahoo!?
HotJobs <http://rd.yahoo.com/careers/mailsig/*http://www.hotjobs.com> -
Search
new jobs daily now
_______________________________________________
Redhat-install-list mailing list
Redhat-install-list redhat com
https://listman.redhat.com/mailman/listinfo/redhat-install-list
_______________________________________________
Redhat-install-list mailing list
Redhat-install-list redhat com
https://listman.redhat.com/mailman/listinfo/redhat-install-list
--
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer rstevens vitalstream com -
- VitalStream, Inc. http://www.vitalstream.com -
- -
- Sarchasm: The gulf between the author of sarcastic wit and the -
- reader...who doesn't get it. -
----------------------------------------------------------------------
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]