redefinition of inline function in class
We know an ordinary member function can not be defined multiple times. Suppose you have the following 3 files a.h, a.cpp, and main.cpp: //a.h #ifndef A_H #define A_H #include <iostream> […]
We know an ordinary member function can not be defined multiple times. Suppose you have the following 3 files a.h, a.cpp, and main.cpp: //a.h #ifndef A_H #define A_H #include <iostream> […]
Today, I ran a program that connects to a database, then a window popped up: Meanwhile, the following error appeared on the console: QSqlDatabase: QMYSQL driver not loaded QSqlDatabase: available […]
You may wonder why the qmake CONFIG variable has values that you never set. Sometimes, you even need to remove some values from CONFIG in your .pro file using: CONFIG […]
You may never notice the interaction between Qt Creator and the GDB debugger in the past. The communication between Qt Creator and GDB is hidden well. You are supposed to […]
If you got an app that was built with Qt lib, how do you get the version of Qt? Suppose you only have the .exe file, you have not the […]
What is lambda in Python? First, it is an expression, so called lambda expression. The expression evaluates to the value after the colon. Since it’s an expression, it can occur […]
You can call a function of the debugged inferior in GDB CLI. Suppose you have a program: #include <stdio.h> void sayhi() { printf(“hi\n”); } int main() { printf(“hello world\n”); sayhi(); […]
Qt Creator loads the GDB pretty printers in the following manner. First, it imports the gdbbridge module by running the following gdb command. python from gdbbridge import * The file […]
Believe or not, you can run python code in GDB. (gdb) python print(“hello world”) &”python print(\”hello world\”)\n” ~”hello world\n” ^done (gdb) In the above example, we call the python function […]
You may think all the optimisations are turned off thoroughly if you do not provide the -O option for gcc. But according to this post, if you do not give […]