Building and Linking Static and Shared Libraries with Makefiles
Library Creation and Linking Basics
Consider a C++ project with the following structure:
add.h
int compute_sum(int x, int y);
add.cpp
#include "add.h"
int compute_sum(int x, int y)
{
return x + y;
}
main.cpp
#include <iostream>
#include "add.h"
int main()
{
std::cout << compute_sum(1, 2) << std: ...
Posted on Sat, 12 Sep 2026 16:40:00 +0000 by MattMan