[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

core when running C++ programs..



Hello all!

I'm having a weird problem compiling anything with the C++ libraries.
When I try to run the program, I always get the message:
	Segmentation fault (core dumped)

Just to give an example, for instance if I compile the following
program I get this core dump:

main.cc:
	int main()
	{
		return 0;
	}


Now, clearly, this as simple as you can get.  If I compile it as
follows it works fine:
	gcc -o main main.cc
But, then the program core dumps if I compile it with any of the
following:
	g++ -o main main.cc
or
	gcc -o main main.cc -lg++
or
	gcc -o main main.cc -lstdc++


Using gdb and running the program I get:
	gdb
	(gdb) file main
	Reading symbols from main...done.
	(gdb) run
	Starting program: /home/rdanse/main

	Program received signal SIGSEGV, Segmentation fault.
	0x400b655b in getenv ()
	(gdb)


I would just like to point out that this is a new install of
Debian 1.3 using the unstable stream (which I don't have problems
with on another machine right now) which was downloaded yesterday
from ftp.debian.org.  I have tried re-downloading libg++27-dev
and libg++27 and reinstalling it but this didn't fix anything.

Any ideas of what the problem would be or how I would better
trace down what the problem is?

Cheers!
Richard..

---------------------------------------------------------------------
Richard Dansereau
Email: rdanse@pobox.com          Home page:  http://pobox.com/~rdanse
Electrical and Computer Engineering - University of Manitoba - Canada
---------------------------------------------------------------------


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: