The demangled name for this is
ESP_WMParameter::ESP_WMParameter(char const*)
You have to take care to not ever, ever ever define functions in a header file, only to declare them. When you define a function in a header file that is included by multiple .c
/.cpp
files (and the error message clearly tells you that’s happening in src/main.cpp
and src/WFCode.cpp
), the function code will be present in all the object files resulting from these source files (main.o
and WFCode.o
) and the linker will then throw an error that the function was defined in multiple object files.
//.h file
#include <header_for_types_you_need.h>
// only declaration
ESP_WMParameter::ESP_WMParameter(char const*);
//.cpp file
#include <header_file_above.h>
ESP_WMParameter::ESP_WMParameter(char const*) {
/* actual function code only in .cpp file */
}
This is an extremely common beginner’s C/C++ programmer mistake and there’s at least one post per week about this type of mistake, that is. Together with the misunderstanding of the effect of #pragma once
. See similiar topics like Struggling on #include directive.