How to build a shared library using gcc/g++? Building a shared library with gcc is easy but it takes 2 steps: gcc -c -fpic mytools.c gcc -shared -o libmytools.so mytools.o […]

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> […]

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(); […]

You’re so lucky to visit my yet another Makefile tutorial because there are so many tutorials about Makefile on the Internet that it is almost impossible for my post to […]