This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Exceptions won't work in my dll!
- From: "Ahern, Charles J" <charles dot j dot ahern at lmco dot com>
- To: gcc at gcc dot gnu dot org
- Date: Wed, 03 Sep 2003 15:33:26 -0400
- Subject: Exceptions won't work in my dll!
Can someone please help me understand why exceptions will not work in my dll file. anytime i do a throw (although they are being caught) it will crash.
here's the makefile, the problem must be some sort of compile option:
# Makefile for building the UUT317 Library: lib317.so.$(VERSION)
# Currrent SW Version: 1.0
VERSION = 1
MAIN = lib317.o Globals_317.o Lib317_Exceptions.o
COMMON = GATAC.o ICPUTL.o Lib317_Utils.o
TESTS = Group_1.o
OBJECTS = $(MAIN) $(COMMON) $(TESTS)
HEADERS = ATAC16.h GATAC.h Globals_317.h ICPUTL.h Lib317_Exceptions.h Lib317_Utils.h Group_1.h
#
# Code Generation Options:
# -fPIC: If supported for the target machine, emit position-independent code,
# suitable for dynamic linking, even if branches need large displacements.
# -fexceptions: Ensure exceptions are turned on, may be needed for c code that still
# needs exception handling.
#
COPTS = -fPIC -fexceptions
#
# LDIRS: directories to search for library files
# IDIRS: directories to search for #include header files
#
LDIRS = -L/usr/lib/gcc-lib/i386-redhat-linux/2.96/ -L/user/lib
IDIRS = -I/usr/local/LibEWE
#
# Compile Flags:
# -O2: Optimize even more. Nearly all supported optimizations
# that do not involve a space-speed tradeoff are performed.
# c: compile but do not link yet
#
CFLAGS = $(IDIRS) -O2 -c
all: clean lib317.so.$(VERSION)
clean:
rm -rf *~ *.o *.so *.so.*
lib: lib317.so.$(VERSION)
lib317.so.$(VERSION): $(OBJECTS)
ld -E -shared -o lib317.so.$(VERSION) $(OBJECTS) $(LDIRS) -lc -lstdc++
/sbin/ldconfig -v -n .
ln -sf $(PWD)/lib317.so.$(VERSION) /usr/EWE/TPS/lib317.so
lib317.o: $(HEADERS) lib317.cpp
g++ $(COPTS) $(CFLAGS) $(basename $@).cpp
Lib317_Utils.o: $(HEADERS) Lib317_Utils.cpp
g++ $(COPTS) $(CFLAGS) $(basename $@).cpp
Globals_317.o: $(HEADERS) Globals_317.cpp
g++ $(COPTS) $(CFLAGS) $(basename $@).cpp
Lib317_Exceptions.o: $(HEADERS) Lib317_Exceptions.cpp
g++ $(COPTS) $(CFLAGS) $(basename $@).cpp
GATAC.o: $(HEADERS) GATAC.cpp
g++ $(COPTS) $(CFLAGS) $(basename $@).cpp
ICPUTL.o: $(HEADERS) ICPUTL.cpp
g++ $(COPTS) $(CFLAGS) $(basename $@).cpp
Group_1.o: $(HEADERS) Group_1.cpp
g++ $(COPTS) $(CFLAGS) $(basename $@).cpp