Problem linking with C++ Exceptions, Again and Again! NC6.2.

bridged with qnx.development_tools
Post Reply
Gianluca Angelici

Problem linking with C++ Exceptions, Again and Again! NC6.2.

Post by Gianluca Angelici » Wed May 12, 2004 10:45 am

Hi to all.
I can't link this dummy program involving STL exceptions.
The linker reports the sequent message:
"Error: undefined reference to 'exception::_Doraise(void) const' "

Notice that if I define the function void _Doraise(void) for the 2 classes
MyExceptionType1 and MyExceptionType2, it seems to work: how can I avoid
this?

Thanks in advance,
Gianluca
-------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------
#include <iostream>
#include <string.h>
#include <stdexcept>

using namespace std;
/*----------------------------------------------------------------------------*/
class MyExceptionType1 : public runtime_error {
public:
MyExceptionType1(string msg = "") : runtime_error(msg) {};
};
/*----------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------*/
class MyExceptionType2 : public logic_error {
public:
MyExceptionType2(string msg = "") : logic_error(msg) {}
};
/*----------------------------------------------------------------------------*/
int main (int argc, char *argv[]) {
while (true)
{
cout << "Press '1' or '2' to throw exceptions" << endl;
string in="";
cin >> in;
if ((in=="1"))
{
try {
throw MyExceptionType1("This is MyExceptionType1!\n\r");
}
catch (MyExceptionType1 myExceptionType1){
cerr<<myExceptionType1.what();
}
}else if (in=="2"){
try {
throw MyExceptionType2("This is MyExceptionType2!\n\r");
}
catch (MyExceptionType2 myExceptionType2){
cerr<<myExceptionType2.what();
}
}
}
}
/*----------------------------------------------------------------------------*/
--------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------
Here is my Makefile:
# This file is automatically generated by RHIDE Version 1.4.7.8-beta/QNX
RtP
# created from within RHIDE
RHIDE_GCC=gcc
RHIDE_AS=gcc
RHIDE_GXX=gcc
RHIDE_GPC=gpc
RHIDE_FPC=ppc386
RHIDE_AR=ar
RHIDE_LD=gcc
RHIDE_G77=g77
RHIDE_NASM=nasm
RHIDE_LD_PASCAL=gpc
RHIDE_LD_FPC=ld
RHIDE_GNATBIND=gnatbind
RHIDE_RM=rm
RHIDE_ARFLAGS=rcs
RHIDE_TYPED_LIBS.f=g2c m
RHIDE_TYPED_LIBS.for=$(RHIDE_TYPED_LIBS.f)
RHIDE_TYPED_LIBS.F=$(RHIDE_TYPED_LIBS.f)
RHIDE_TYPED_LIBS.fpp=$(RHIDE_TYPED_LIBS.f)
RHIDE_TYPED_LIBS_GPC=gpc m
RHIDE_TYPED_LIBS_FPC=fpc
RHIDE_TYPED_LIBS.p=$(RHIDE_TYPED_LIBS_$(PASCAL_TYPE))
RHIDE_TYPED_LIBS.pas=$(RHIDE_TYPED_LIBS.p)
RHIDE_TYPED_LIBS.pp=$(RHIDE_TYPED_LIBS_FPC)
RHIDE_TYPED_LIBS_DJGPP.cc=stdcxx
RHIDE_TYPED_LIBS_Linux.cc=stdc++
RHIDE_TYPED_LIBS.cc=$(RHIDE_TYPED_LIBS_$(RHIDE_OS).cc)
RHIDE_TYPED_LIBS.cpp=$(RHIDE_TYPED_LIBS.cc)
RHIDE_TYPED_LIBS.cxx=$(RHIDE_TYPED_LIBS.cc)
RHIDE_TYPED_LIBS.C=$(RHIDE_TYPED_LIBS.cc)
RHIDE_TYPED_LIBS.ii=$(RHIDE_TYPED_LIBS.cc)
RHIDE_TYPED_LIBS.l=fl
RHIDE_TYPED_LIBS.m=objc
RHIDE_TYPED_LIBS.adb=gnat
RHIDE_TYPED_LIBS_SUFFIXES=$(sort $(foreach item,$(PROJECT_ITEMS),$(suffix\
$(item))))
RHIDE_TYPED_LIBS=$(foreach\
suff,$(RHIDE_TYPED_LIBS_SUFFIXES),$(RHIDE_TYPED_LIBS$(suff)))
RHIDE_INCLUDES=$(SPECIAL_CFLAGS) $(addprefix -I,$(INCLUDE_DIRS))
RHIDE_LIBDIRS=$(addprefix -L,$(LIB_DIRS))
RHIDE_LIBS=$(addprefix -l,$(LIBS) $(RHIDE_TYPED_LIBS) $(RHIDE_OS_LIBS))
RHIDE_LDFLAGS=$(SPECIAL_LDFLAGS) $(addprefix -Xlinker ,$(LD_EXTRA_FLAGS))
RHIDE_NASM_TARGET_DJGPP=coff
RHIDE_NASM_TARGET_Linux=elf
RHIDE_NASM_TARGET=$(RHIDE_NASM_TARGET_$(RHIDE_OS))
RHIDE_COMPILE_NASM=$(RHIDE_NASM) -f $(RHIDE_NASM_TARGET) $(LOCAL_OPT) -o\
$(OUTFILE) $(SOURCE_NAME)
RHIDE_COMPILE_FORTRAN=$(RHIDE_G77) $(RHIDE_INCLUDES) $(C_DEBUG_FLAGS)\
$(C_OPT_FLAGS) $(C_WARN_FLAGS) $(C_F_LANG_FLAGS) $(C_EXTRA_FLAGS)\
$(LOCAL_OPT) -c $(SOURCE_NAME) -o $(OUTFILE)
RHIDE_COMPILE_FORTRAN_FORCE=$(RHIDE_G77) $(RHIDE_INCLUDES)
$(C_DEBUG_FLAGS)\
$(C_OPT_FLAGS) $(C_WARN_FLAGS) $(C_F_LANG_FLAGS) $(C_EXTRA_FLAGS)\
-x f77 $(LOCAL_OPT) -c $(SOURCE_NAME) -o $(OUTFILE)
RHIDE_COMPILE_C=$(RHIDE_GCC) $(RHIDE_INCLUDES) $(C_DEBUG_FLAGS)\
$(C_OPT_FLAGS) $(C_WARN_FLAGS) $(C_C_LANG_FLAGS) $(C_EXTRA_FLAGS)\
$(LOCAL_OPT) $(CPPFLAGS) $(CFLAGS) $(RHIDE_OS_CFLAGS) -c\
$(SOURCE_NAME) -o $(OUTFILE)
RHIDE_COMPILE_C_FORCE=$(RHIDE_GCC) $(RHIDE_INCLUDES) $(C_DEBUG_FLAGS)\
$(C_OPT_FLAGS) $(C_WARN_FLAGS) $(C_C_LANG_FLAGS) $(C_EXTRA_FLAGS)\
-x c $(LOCAL_OPT) $(CPPFLAGS) $(CFLAGS) $(RHIDE_OS_CFLAGS) -c\
$(SOURCE_NAME) -o $(OUTFILE)
RHIDE_COMPILE_CC=$(RHIDE_GXX) $(RHIDE_INCLUDES) $(C_DEBUG_FLAGS)\
$(C_OPT_FLAGS) $(C_WARN_FLAGS) $(C_C_LANG_FLAGS)\
$(C_CXX_LANG_FLAGS) $(C_EXTRA_FLAGS) $(CPPFLAGS) $(CXXFLAGS)\
$(RHIDE_OS_CXXFLAGS) $(LOCAL_OPT) -c $(SOURCE_NAME) -o $(OUTFILE)
RHIDE_COMPILE_CC_FORCE=$(RHIDE_GXX) $(RHIDE_INCLUDES) $(C_DEBUG_FLAGS)\
$(C_OPT_FLAGS) $(C_WARN_FLAGS) $(C_C_LANG_FLAGS)\
$(C_CXX_LANG_FLAGS) $(C_EXTRA_FLAGS) $(CPPFLAGS) $(CXXFLAGS)\
$(RHIDE_OS_CXXFLAGS) -x c++ $(LOCAL_OPT) -c $(SOURCE_NAME) -o\
$(OUTFILE)
RHIDE_COMPILE_ASM=$(RHIDE_AS) $(RHIDE_INCLUDES) $(C_DEBUG_FLAGS)\
$(C_OPT_FLAGS) $(C_WARN_FLAGS) $(C_EXTRA_FLAGS) $(LOCAL_OPT) -c\
$(SOURCE_NAME) -o $(OUTFILE)
RHIDE_COMPILE_ASM_FORCE=$(RHIDE_AS) $(RHIDE_INCLUDES) $(C_DEBUG_FLAGS)\
$(C_OPT_FLAGS) $(C_WARN_FLAGS) $(C_EXTRA_FLAGS) -x assembler\
$(LOCAL_OPT) -c $(SOURCE_NAME) -o $(OUTFILE)
RHIDE_GPC_FLAGS=$(RHIDE_INCLUDES) $(C_DEBUG_FLAGS) $(C_OPT_FLAGS)\
$(C_WARN_FLAGS) $(C_P_LANG_FLAGS) $(C_EXTRA_FLAGS)
RHIDE_COMPILE_GPC=$(RHIDE_GPC) $(RHIDE_GPC_FLAGS) $(LOCAL_OPT) -c\
$(SOURCE_NAME) -o $(OUTFILE)
RHIDE_COMPILE_GPC_FORCE=$(RHIDE_GPC) $(RHIDE_GPC_FLAGS) -x pascal\
$(LOCAL_OPT) -c $(SOURCE_NAME) -o $(OUTFILE)
RHIDE_FPC_FLAGS=$(C_FPC_LANG_FLAGS) $(LOCAL_OPT) $(addprefix\
-Up,$(INCLUDE_DIRS)) $(C_EXTRA_FLAGS)
RHIDE_COMPILE_FPC=$(RHIDE_FPC) $(RHIDE_FPC_FLAGS) -E- $(SOURCE_NAME)
RHIDE_COMPILE_FPC_FORCE=$(RHIDE_FPC) $(RHIDE_FPC_FLAGS) -B -E-\
$(SOURCE_NAME)
RHIDE_COMPILE_LINK=$(RHIDE_LD) $(RHIDE_LIBDIRS) $(C_EXTRA_FLAGS) -o\
$(OUTFILE) $(OBJFILES) $(LIBRARIES) $(LDFLAGS) $(RHIDE_LDFLAGS)\
$(RHIDE_LIBS)
RHIDE_COMPILE_LINK_GPC=$(RHIDE_LD_PASCAL) $(RHIDE_LIBDIRS)
$(C_EXTRA_FLAGS)\
-o $(OUTFILE) $(OBJFILES) $(LIBRARIES) $(RHIDE_LDFLAGS) $(LDFLAGS)\
$(RHIDE_LIBS)
RHIDE_COMPILE_LINK_GPC_AUTOMAKE=$(RHIDE_LD_PASCAL) $(RHIDE_LIBDIRS) -o\
$(OUTFILE) --automake="$(strip $(RHIDE_GPC_FLAGS))"\
$(RHIDE_GPC_FLAGS) $(SOURCE_NAME) $(LIBRARIES) $(LDFLAGS)\
$(RHIDE_LDFLAGS) $(RHIDE_LIBS)
RHIDE_COMPILE_PASCAL=$(RHIDE_COMPILE_$(PASCAL_TYPE))
RHIDE_COMPILE_PASCAL_FORCE=$(RHIDE_COMPILE_$(PASCAL_TYPE)_FORCE)
RHIDE_COMPILE_LINK_PASCAL_AUTOMAKE=$(RHIDE_COMPILE_LINK_$(PASCAL_TYPE)_AUTOMAKE)
RHIDE_COMPILE_LINK_PASCAL=$(RHIDE_COMPILE_LINK_$(PASCAL_TYPE))
RHIDE_FPC_LIBDIRS_DJGPP=$(DJDIR)/lib
RHIDE_FPC_LIBDIRS_Linux=/usr/local/lib /usr/lib /lib
RHIDE_FPC_LIBDIRS=$(RHIDE_FPC_LIBDIRS_$(RHIDE_OS))
RHIDE_FPC_LINK_FLAGS_DJGPP=-O coff-go32-exe $(RHIDE_LIBDIRS) $(addprefix\
-L,$(RHIDE_FPC_LIBDIRS))
RHIDE_FPC_LINK_FLAGS_Linux=$(RHIDE_LIBDIRS) $(addprefix\
-L,$(RHIDE_FPC_LIBDIRS))
RHIDE_FPC_LINK_FLAGS=$(RHIDE_FPC_LINK_FLAGS_$(RHIDE_OS))
RHIDE_COMPILE_LINK_FPC=$(RHIDE_LD_FPC) -o $(OUTFILE) $(OBJFILES)\
$(RHIDE_FPC_LINK_FLAGS) $(LIBRARIES) $(RHIDE_LIBS)
RHIDE_COMPILE_LINK_FPC_AUTOMAKE=$(RHIDE_FPC) -o$(OUTFILE) $(SOURCE_NAME)\
$(RHIDE_FPC_FLAGS) -E+
RHIDE_COMPILE_ARCHIVE=$(RHIDE_AR) $(RHIDE_ARFLAGS) $(OUTFILE) $(OBJFILES)
RHIDE_COMPILE_ADA=$(RHIDE_GCC) $(RHIDE_INCLUDES) $(C_DEBUG_FLAGS)\
$(C_OPT_FLAGS) $(C_WARN_FLAGS) $(C_C_LANG_FLAGS) $(C_EXTRA_FLAGS)\
$(LOCAL_OPT) $(C_ADA_LANG_FLAGS) $(CPPFLAGS) $(CFLAGS)\
$(RHIDE_OS_CFLAGS) -c $(SOURCE_NAME) -o $(OUTFILE)
RHIDE_ADA_BIND_FILE=$(addprefix _,$(setsuffix .c,$(OUTFILE)))
RHIDE_COMPILE_LINK_ADA_BIND=$(RHIDE_GNATBIND) -o $(RHIDE_ADA_BIND_FILE)\
$(setsuffix .ali,$(OUTFILE))
RHIDE_COMPILE_LINK_ADA_LINK=$(RHIDE_LD) $(RHIDE_LIBDIRS) $(C_EXTRA_FLAGS)
-o\
$(OUTFILE) $(RHIDE_ADA_BIND_FILE) $(OBJFILES) $(LIBRARIES)\
$(LDFLAGS) $(RHIDE_LDFLAGS) $(RHIDE_LIBS)
_RHIDE_COMPILE_LINK_ADA=$(RHIDE_COMPILE_LINK_ADA_BIND);\
$(RHIDE_COMPILE_LINK_ADA_LINK); $(RHIDE_RM)\
$(RHIDE_ADA_BIND_FILE)
RHIDE_COMPILE_LINK_ADA=gnatbl $(RHIDE_LIBDIRS) $(C_EXTRA_FLAGS) -o\
$(OUTFILE) $(setsuffix .ali,$(OUTFILE)) $(LIBRARIES) $(LDFLAGS) \
$(RHIDE_LDFLAGS) $(RHIDE_LIBS)
RHIDE_COMPILE.c.o=$(RHIDE_COMPILE_C)
RHIDE_COMPILE.cc.o=$(RHIDE_COMPILE_CC)
RHIDE_COMPILE.p.o=$(RHIDE_COMPILE_PASCAL)
RHIDE_COMPILE.pas.o=$(RHIDE_COMPILE.p.o)
RHIDE_COMPILE.pp.o=$(RHIDE_COMPILE_FPC)
RHIDE_COMPILE.pas.s.GPC=$(subst -c $(SOURCE_NAME),-S\
$(SOURCE_NAME),$(RHIDE_COMPILE_GPC))
RHIDE_COMPILE.pas.s.FPC=$(RHIDE_COMPILE_FPC) -a -s
RHIDE_COMPILE.pas.s=$(RHIDE_COMPILE.pas.s.$(PASCAL_TYPE))
RHIDE_COMPILE.f.o=$(RHIDE_COMPILE_FORTRAN)
RHIDE_COMPILE.nsm.o=$(RHIDE_COMPILE_NASM)
RHIDE_COMPILE.s.o=$(RHIDE_COMPILE_ASM)
RHIDE_COMPILE.c.s=$(subst -c $(SOURCE_NAME),-S\
$(SOURCE_NAME),$(RHIDE_COMPILE_C))
RHIDE_COMPILE.c.i=$(subst -c $(SOURCE_NAME),-E\
$(SOURCE_NAME),$(RHIDE_COMPILE_C))
RHIDE_COMPILE.i.s=$(RHIDE_COMPILE.c.s)
RHIDE_COMPILE.cc.s=$(subst -c $(SOURCE_NAME),-S\
$(SOURCE_NAME),$(RHIDE_COMPILE_CC))
RHIDE_COMPILE.cc.ii=$(subst -c $(SOURCE_NAME),-E\
$(SOURCE_NAME),$(RHIDE_COMPILE_CC))
RHIDE_COMPILE.ii.s=$(RHIDE_COMPILE.cc.s)
RHIDE_COMPILE.cpp.o=$(RHIDE_COMPILE.cc.o)
RHIDE_COMPILE.cxx.o=$(RHIDE_COMPILE.cc.o)
RHIDE_COMPILE.C.o=$(RHIDE_COMPILE.cc.o)
RHIDE_COMPILE.pas.o=$(RHIDE_COMPILE.p.o)
RHIDE_COMPILE.for.o=$(RHIDE_COMPILE.f.o)
RHIDE_COMPILE.F.o=$(RHIDE_COMPILE.f.o)
RHIDE_COMPILE.fpp.o=$(RHIDE_COMPILE.f.o)
RHIDE_COMPILE.asm.o=$(RHIDE_COMPILE.nsm.o)
RHIDE_COMPILE.cpp.s=$(RHIDE_COMPILE.cc.s)
RHIDE_COMPILE.cxx.s=$(RHIDE_COMPILE.cc.s)
RHIDE_COMPILE.C.s=$(RHIDE_COMPILE.cc.s)
RHIDE_COMPILE.cpp.ii=$(RHIDE_COMPILE.cc.ii)
RHIDE_COMPILE.cxx.ii=$(RHIDE_COMPILE.cc.ii)
RHIDE_COMPILE.C.ii=$(RHIDE_COMPILE.cc.ii)
RHIDE_COMPILE.adb.o=$(RHIDE_COMPILE_ADA)
RHIDE_FSDB=fsdb $(OUTFILE) $(addprefix -p ,$(SRC_DIRS)) $(PROG_ARGS)
RHIDE_GDB=gdb $(OUTFILE) $(addprefix -d ,$(SRC_DIRS))
DEFAULT_GREP_MASK=*.[cfhmnps]*
RHIDE_GREP=grep -n $(prompt ,$(WUC) $(DEFAULT_GREP_MASK))
RHIDE_GPROF=gprof $(OUTFILE)
RHIDE_RLOG=$(shell rlog -R $(rlog_arg))
RHIDE_CO=$(shell co -q $(co_arg))
RHIDE_STANDARD_INCLUDES_DJGPP=$(addprefix $(DJDIR)/,include include/sys\
lang/cxx lang/cxx/std)
RHIDE_STANDARD_INCLUDES_Linux=$(addprefix /usr/,include include/sys\
include/g++ include/g++/std)
RHIDE_STANDARD_INCLUDES=$(RHIDE_STANDARD_INCLUDES_$(RHIDE_OS))
RHIDE_CONFIG_DIRS_DJGPP=. $(RHIDE_SHARE) $(HOME) $(DJDIR)/share/rhide
RHIDE_CONFIG_DIRS_Linux=. $(RHIDE_SHARE) $(HOME) /usr/local/share/rhide\
/usr/share/rhide /local/share/rhide /share/rhide
RHIDE_CONFIG_DIRS=$(RHIDE_CONFIG_DIRS_$(RHIDE_OS))\
$(RHIDE_BIN_DIR)/../share/rhide
RHIDE_PATH_SEPARATOR_DJGPP=;
RHIDE_PATH_SEPARATOR_Linux=:
RHIDE_PATH_SEPARATOR=$(RHIDE_PATH_SEPARATOR_$(RHIDE_OS))
INCLUDE_DIRS=/usr/include/g++-3 /usr/ntox86/include /usr/include/cpp
LIB_DIRS=
C_DEBUG_FLAGS=-g
C_OPT_FLAGS=
C_WARN_FLAGS=
C_C_LANG_FLAGS=
C_CXX_LANG_FLAGS=
C_P_LANG_FLAGS=
C_FPC_LANG_FLAGS=
C_F_LANG_FLAGS=
C_ADA_LANG_FLAGS=
LIBS=
LD_EXTRA_FLAGS=-lstdc++
C_EXTRA_FLAGS=-D_PTHREADS=1
LOCAL_OPT=$(subst ___~~~___, ,$(subst $(notdir $<)___,,$(filter $(notdir\
$<)___%,$(LOCAL_OPTIONS))))
OBJFILES=main.o
LIBRARIES=
SOURCE_NAME=$<
OUTFILE=$@
SPECIAL_CFLAGS=
SPECIAL_LDFLAGS=
PROG_ARGS=
SRC_DIRS=
WUC=
EDITORS=
RHIDE_OS=$(RHIDE_OS_)
ifeq ($(strip $(RHIDE_OS)),)
ifneq ($(strip $(DJDIR)),)
RHIDE_OS_:=DJGPP
else
RHIDE_OS_:=$(shell uname)
endif
endif

MAIN_TARGET=maintarget
PROJECT_ITEMS=main.cpp
DEFAULT_MASK=*.[acfghimnops]*
RHIDE_BIN_DIR=/componenti.neu/eccezioni
PASCAL_TYPE=GPC
%.o: %.c
$(RHIDE_COMPILE.c.o)
%.o: %.i
$(RHIDE_COMPILE_C)
%.o: %.cc
$(RHIDE_COMPILE.cc.o)
%.o: %.cpp
$(RHIDE_COMPILE.cpp.o)
%.o: %.cxx
$(RHIDE_COMPILE.cxx.o)
%.o: %.C
$(RHIDE_COMPILE.C.o)
%.o: %.ii
$(RHIDE_COMPILE_CC)
%.o: %.s
$(RHIDE_COMPILE.s.o)
%.o: %.S
$(RHIDE_COMPILE_ASM)
%.s: %.c
$(RHIDE_COMPILE.c.s)
%.s: %.i
$(RHIDE_COMPILE.i.s)
%.s: %.cc
$(RHIDE_COMPILE.cc.s)
%.s: %.cpp
$(RHIDE_COMPILE.cpp.s)
%.s: %.cxx
$(RHIDE_COMPILE.cxx.s)
%.s: %.C
$(RHIDE_COMPILE.C.s)
%.o: %.pas
$(RHIDE_COMPILE.pas.o)
%.o: %.p
$(RHIDE_COMPILE.p.o)
%.o: %.pp
$(RHIDE_COMPILE.pp.o)
%.s: %.pas
$(RHIDE_COMPILE.pas.s)
%.o: %.m
$(RHIDE_COMPILE_OBJC)
%.o: %.f
$(RHIDE_COMPILE.f.o)
%.o: %.for
$(RHIDE_COMPILE.for.o)
%.o: %.F
$(RHIDE_COMPILE.F.o)
%.o: %.fpp
$(RHIDE_COMPILE.fpp.o)
%.o: %.asm
$(RHIDE_COMPILE.asm.o)
%.o: %.nsm
$(RHIDE_COMPILE.nsm.o)
%.o: %.adb
$(RHIDE_COMPILE.adb.o)
%.i: %.c
$(RHIDE_COMPILE.c.i)
%.s: %.c
$(RHIDE_COMPILE.c.s)
%.ii: %.cc
$(RHIDE_COMPILE.cc.ii)
%.s: %.cc
$(RHIDE_COMPILE.cc.s)
%.ii: %.cpp
$(RHIDE_COMPILE.cpp.ii)
%.s: %.cpp
$(RHIDE_COMPILE.cpp.s)
%.ii: %.cxx
$(RHIDE_COMPILE.cxx.ii)
%.s: %.cxx
$(RHIDE_COMPILE.cxx.s)
%.ii: %.C
$(RHIDE_COMPILE.C.ii)
%.s: %.C
$(RHIDE_COMPILE.C.s)
all::
DEPS_0= main.o
NO_LINK=
LINK_FILES=$(filter-out $(NO_LINK),$(DEPS_0))
maintarget:: $(DEPS_0)
$(RHIDE_COMPILE_LINK)
DEPS_1=main.cpp
main.o:: $(DEPS_1)
$(RHIDE_COMPILE.cpp.o)
all:: maintarget

--------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------

John Nagle

Re: Problem linking with C++ Exceptions, Again and Again! NC

Post by John Nagle » Fri May 28, 2004 12:56 am

Gianluca Angelici wrote:
Hi to all.
I can't link this dummy program involving STL exceptions.
The linker reports the sequent message:
"Error: undefined reference to 'exception::_Doraise(void) const' "
Compile with QCC instead of gcc and you should bring in the
exceptions library. There are some obscure libraries that need
to be linked in for exception handling.

John Nagle
Team Overbot

Post Reply

Return to “qnx.development_tools”