Link error
It is recommended to separate the class definition and implementation into two files, otherwise, it may lead to multiple definitions, which can cause link errors. For example:
// head1.hpp
#include "EasyBMP.hpp"
// main.cpp
#include "head1.hpp"
By splitting the class definition (EasyBMP.hpp) and implementation (EasyBMP.cpp), you avoid issues such as multiple definitions when including the header in different files.
It is recommended to separate the class definition and implementation into two files, otherwise, it may lead to multiple definitions, which can cause link errors. For example:
// head1.hpp #include "EasyBMP.hpp"// main.cpp #include "head1.hpp"By splitting the class definition (
EasyBMP.hpp) and implementation (EasyBMP.cpp), you avoid issues such as multiple definitions when including the header in different files.
The purpose of this library was to be minimal and keep it in a single file. This could be solved by adding preprocessor definitions and conditionals. Does this solution fit your needs? If it's the case, feel free to fork and start a pull request.