ld: duplicate symbol
It sounds like io_functions.cpp is being included twice (once by generics.cpp, once by main.cpp).
My first thought was that you're including it twice on the linker command but it appears to be complaining about having the same function in main.o
and generics.o
.
So it looks like you're including the io_functions.cpp
file into the main.cpp
and generics.cpp
which is a bad idea at the best of times.
You should have a header file (e.g., io_functions.h
) that specifies everything contained in io_functions.cpp
and include that header file into the other two.