Re: no Hello World!!
- From: jt@xxxxxxxxxxx (Jens Thoms Toerring)
- Date: 19 Mar 2007 21:46:30 GMT
rwittenberg@xxxxxxxxxxxxxxx wrote:
now my program looks like this...
#include <stdio.h>
int main(void)
{
double number;
printf("\nHello World");
return 0;
}
and I compile it with
gcc -g hello_world.c
now when I run the a.out file I get "Floating point exception" and the
program crashes
gdb a.out
(gdb) run
Starting program: ~/a.out
Program received signal SIGFPE, Arithmetic exception.
0xb7f695d1 in ?? ()
(gdb) bt
#0 0xb7f695d1 in ?? ()
#1 0x00000000 in ?? ()
#2 0x00000000 in ?? ()
.......
.......
.......
#61 0x00000000 in ?? ()
#62 0x08049514 in _DYNAMIC ()
.......
.......
.......
#1429 0x00000000 in ?? ()
Wow, that's deep trace, and that without any kind of recursion;-)
Never have ssen anything like that.
Something must be horribly broken with your system. Is that a
run-of-the-mill install or did you something "interesting" like
installing a new libc or mess around with the dynamic loader
(but then you probably wouldn't be able to start any programs
at all)? Does something similar also happen when you compile
other programs?
I have a feeling the problem is in the libraries, but don't know how
to go forward from this point.
There aren't going to be many libraries needed for this, actually
libc and ld-linux should be all and with them broken probably most
programs wouldn't work anymore. What do you get when you do
ldd a.out
wich tells you which libraries the program is linked against.
Regards, Jens
--
\ Jens Thoms Toerring ___ jt@xxxxxxxxxxx
\__________________________ http://toerring.de
.
- Follow-Ups:
- Re: no Hello World!!
- From: rwittenberg
- Re: no Hello World!!
- References:
- no Hello World!!
- From: rwittenberg
- Re: no Hello World!!
- From: Jens Thoms Toerring
- Re: no Hello World!!
- From: rwittenberg
- no Hello World!!
- Prev by Date: Re: no Hello World!!
- Next by Date: Re: How to write a program to track the value of a certain variable at run-time using debug features???
- Previous by thread: Re: no Hello World!!
- Next by thread: Re: no Hello World!!
- Index(es):