This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Core Dump , when running ./a.out


Hello Folks

 I tried all the procedures that is described below,

 when,  I use : setenv   LD_LIBRARY_PATH=/usr/ucblib
I cannot use : vi anymore, because  , in my PATH,   (vi) is under /usr/bin.
I troed all the options.

when, I compile and run it (cores  dump), and the core dumb is coming from
:  #include <iostream.h>

it created a core file but, I cold not know , where is the core coming
from.
I tried to use :
gdb   ./a.out        (and several)   gdb is not exist on my system(even not
dbx), or several others.

my program is very simple:

#include <iostream.h>
main()
  {
    count << "this is a test\n";
 }


---------------------- Forwarded by AREF ABOULHOSN/F47621C/VEND/FEDEX on
02/27/2001 09:00 AM ---------------------------


David Berthelot <davidb@Magma-DA.COM>@Magma-DA.COM on 02/26/2001 02:08:00
PM

Sent by:  davidb@Magma-DA.COM


To:   aaboulhosn@entpm2.prod.fedex.com
cc:

Subject:  Re: Core Dump , when running ./a.out


aaboulhosn@entpm2.prod.fedex.com wrote:

> I compiled my bb.cc  program
> using /usr/local/bin/g++  bb.cc
>
> I tried to compile with :   bb.cpp. bb.c, bb.cc, bb.C   almost all the
> options.

It should have no influence.

> when I run my ./a.out    file
> it gives me the following message:
>
> /usr/ucblib/libucb.so.1  not found

Ok so far, it is a problem of shared libraries.

> So I resolve this problem by usig :  ld   -R  /usr/ucblib

> BUT, now,   when , I run ./a.out , it complains :    core dump

Ok, can you try that:
(use tcsh):
tcsh > setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/usr/ucblib
tcsh > /usr/local/bin/g++ bb.cc
tcsh > a.out

If it doesn't work, try to debug and see where  it crashes:
Compiling with debug ->
tcsh > /usr/local/bin/g++ -g bb.cc
tcsh > gdb a.out
(gdb) > run

> and my program looks like this:
>
> #include <iostream.h>
>
> main()
>  {
>     int a;
>     a = 1;
>
>    cout    << "  I am testing  " <<   a;
> }
>
> I tried all the option , I change the path of the iostream.h file in my
> program  to:
> #include   "/my/path/iostream.h"      for example.

It should have no effect, the headers are recognized, it is the library
(binary machine code that is not found).

Good luck,

David




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]