Unsolved Qt Creator "The inferior stopped because it triggered an exception"
-
I'm writing an application where I want to use the mongocxx driver. I've already created a topic because I got an error, but now, all dlls and libs are included, but when I run the program, I get the following error:
Can someone tell me why this happens and how to solve this?
The compiler is MSCV 2017 64 bit. -
@SimonR said in Qt Creator "The inferior stopped because it triggered an excepection":
Can someone tell me why this happens and how to solve this?
No, but debugger maybe
-
Hi
Set a breakpoint in main.cppIf the crash comes before reaching first line, it means something up with the DLLS.
Else single step the app until you find the line that gives this exception.
-
The program crashes when I first use code from a third-party provider. I'll try to contact the support for the driver.
-
Hi,
Before that, are you sure that the corresponding dll can be found by your application ?
-
@SGaist
Yes, all the dlls are in my build directory. I use this to tell my application where the .lib files are:LIBS += -LC:/mongo-cxx-driver-3.4.1/lib -lbsoncxx \ -LC:/mongo-cxx-driver-3.4.1/lib -lmongocxx
-
@SimonR said in Qt Creator "The inferior stopped because it triggered an exception":
LIBS += -LC:/mongo-cxx-driver-3.4.1/lib -lbsoncxx
-LC:/mongo-cxx-driver-3.4.1/lib -lmongocxxThis is for the linker not for your application.
"all the dlls are in my build directory" - you mean in the build directory of your application? -
@jsulm yes.
-
This is for the linker not for your application.
That is correct, but QtCreator adds these paths to
LD_LIBRARY_PATH
when running the app, so the app can find the libs.No need to copy them around.
Regards
-
@aha_1980 said in Qt Creator "The inferior stopped because it triggered an exception":
QtCreator adds these paths to LD_LIBRARY_PATH when running the app
Yes, if running from QtCreator