public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* -lcrypto and throw problem
@ 2002-01-03 18:06 Alvin Ian Paule
  0 siblings, 0 replies; only message in thread
From: Alvin Ian Paule @ 2002-01-03 18:06 UTC (permalink / raw)
  To: gcc-help

i have this weird problem concerning the throw
operation.  if my program was linked with the -lcrypto
library, whenever throw was executed, the program
terminates and produces a core dump.  here`s the
program i used (i made it as simple as possible, and
it was saved in the file program.cc):

--------------------------------------------------------
#include <iostream>
#include <string>

using namespace std;

class Program {
public:    
    Program();    
};

Program::Program() {
    throw string("error\n");
}

int main(void)
{   
    try {
        Program p;
    }

    catch (string s) {
        cout << s ;
    }

    return 0;
}
--------------------------------------------------------

here is the makefile i used to compile and link the
program:

--------------------------------------------------------
# COMPILER OPTIONS
CC      = g++
FLG     = -c 
LIB     = -L/usr/local/ssl/lib -lcrypto
COM     = 

# FILE GROUPS
SRC   = program.cc
EXE   = program
OBJ   = program.o

# MAKE OPTIONS
all  : $(OBJ) $(EXE) 
clean: 
	rm -f *.o $(EXE)

# LM OBJECT FILES
program.o    : $(SRC)
	$(CC) $(COM) $(FLG) $(SRC) -o $(OBJ)

# EXECUTABLE FILES
program      : $(OBJ)  
	$(CC) $(OBJ) $(LIB) -o $(EXE)
--------------------------------------------------------

also, as additional info, my compiler is a g++ 3.0.2,
the libcrypto.so is a 0.9.6,  the operating system is
a Solaris 8, and the machine is a Sun Ultra 10.  hope
somebody can help...

alvin

E-mail: alvin_ian_paule@yahoo.com

__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-01-04  2:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-03 18:06 -lcrypto and throw problem Alvin Ian Paule

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).