J
Johannes Bauer
Hello group,
yes, I know, this is no language question - but I feel here are the
experts who can help me.
This is the situation: I have a Exception hierarchy, GenericException
has many children. I'm under Linux and load classes dynamically at
runtime using dlopen(). Now the Exception classes are used by both the
..so-files (during linkage) and by the main application.
Now when an exception is thrown by a dynamically loaded shared object,
my main application does not catch it. catch (...) does, but catch
(GenericException &e) doesn't.
It seems to have something to do with linkage or the order of how files
are compiled or linked - because it worked at some point in time. Now it
doesn't anymore and I'm pretty puzzled.
This is how I compile my main application:
g++ -O0 -Wall -g -D_REENTRANT -DTHREADS -DTRACE -DHAVE_BOOST -ICommon
-ldl -lboost_regex -lboost_thread -lboost_program_options -lcfitsio
-lfftw3 -lm -lusb -o ccdsrv ccdsrv.cpp Authentification.o Base64.o
ConnectionHandlerThread.o ListenSocket.o md5.o PictureTest.o
SignalHandler.o TCPConnection.o Testsuite.o Common/Block.o
Common/GenericException.o Common/ModuleHandler.o Common/ModuleInstance.o
This is how I compile the exception class:
g++ -O0 -Wall -g -D_REENTRANT -DTHREADS -DTRACE -DHAVE_BOOST -fPIC
-I../../Common -Weffc++ -c -o ../../Common/GenericException.o
.../../Common/GenericException.cpp
and this is how I link my module:
g++ -O0 -Wall -g -D_REENTRANT -DTHREADS -DTRACE -DHAVE_BOOST -fPIC
-I../../Common -Weffc++ -shared -o ModuleSBIG.so ModuleSBIG.cpp
.../../Common/GenericException.o ../../Common/ModuleInstance.o
.../../Common/Block.o Static.o USB.o SBIGUtils.o
Does anyone see an obvious error that I made?
Kind regards,
Johannes
yes, I know, this is no language question - but I feel here are the
experts who can help me.
This is the situation: I have a Exception hierarchy, GenericException
has many children. I'm under Linux and load classes dynamically at
runtime using dlopen(). Now the Exception classes are used by both the
..so-files (during linkage) and by the main application.
Now when an exception is thrown by a dynamically loaded shared object,
my main application does not catch it. catch (...) does, but catch
(GenericException &e) doesn't.
It seems to have something to do with linkage or the order of how files
are compiled or linked - because it worked at some point in time. Now it
doesn't anymore and I'm pretty puzzled.
This is how I compile my main application:
g++ -O0 -Wall -g -D_REENTRANT -DTHREADS -DTRACE -DHAVE_BOOST -ICommon
-ldl -lboost_regex -lboost_thread -lboost_program_options -lcfitsio
-lfftw3 -lm -lusb -o ccdsrv ccdsrv.cpp Authentification.o Base64.o
ConnectionHandlerThread.o ListenSocket.o md5.o PictureTest.o
SignalHandler.o TCPConnection.o Testsuite.o Common/Block.o
Common/GenericException.o Common/ModuleHandler.o Common/ModuleInstance.o
This is how I compile the exception class:
g++ -O0 -Wall -g -D_REENTRANT -DTHREADS -DTRACE -DHAVE_BOOST -fPIC
-I../../Common -Weffc++ -c -o ../../Common/GenericException.o
.../../Common/GenericException.cpp
and this is how I link my module:
g++ -O0 -Wall -g -D_REENTRANT -DTHREADS -DTRACE -DHAVE_BOOST -fPIC
-I../../Common -Weffc++ -shared -o ModuleSBIG.so ModuleSBIG.cpp
.../../Common/GenericException.o ../../Common/ModuleInstance.o
.../../Common/Block.o Static.o USB.o SBIGUtils.o
Does anyone see an obvious error that I made?
Kind regards,
Johannes