Re: SIGSEGV Error when debugging with Qt creator.

Originally Posted by
jiapei100

Originally Posted by
Amleto
either way, it means that there is something wrong with you program - most likely it is something that is 'undefined behaviour', and you are just getting lucky with one compiler/ide
Hi, Amleto, Thank you very much for your prompt reply ! Thank you !!
However,
1) I don't think it has something to do with the compilers.
I built 11 libraries under Eclipse, and 7 applications under QtCreator, which are based on those 11 libraries. 6 out of these 7 applications work perfect under QtCreator, and there is only 1 doesn't work properly.
Since 6 are working. Thus, I don't think there is a problem with the compiler. In fact, both Eclipse and QtCreator are using the compiler GCC.
2) I don't think there are some problems with my code as well.
Because my code work fine under Codelite (this one supports qmake well) and Visual Studio 2010 (with Qt Integrator).
Conclusion: It could be a problem about the settings of compiler? I've no idea.
Anyway, thank you for your reply.
Best regards
Pei
Just because something works sometimes does not mean it is ok code according to the c++ standard. Therefore your supposition, above, is incorrect.
Compiler settings ... erm, it is still only going to compiler YOUR code. If your program goes wrong it's not the compiler's fault. Unless you are linking incorrect versions of libraries together (e.g. release + debug), 'settings' are not going to be the problem. We are back to YOUR code.
Can you see a common theme?
The problem is your code (99% probability).
If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.
Bookmarks