No, #include "io.h" does not automatically include IO.cpp. What '#include "io.h"' does is literally place the contents of "io.h" at that point in your file. CPP makes NO connection between io.h and io.cpp. The similarity in names is for your own convenience, but it has no semantic significant to C++.
Compilation occurs in two steps. First, a compiler compiles each .cpp file (not each .h file). The .h files let a given file know that a particular function exists, and that it will be implemented in some (probably different) .cpp file. The compiler generates a .obj file for each .cpp file it is instructed to compile. So for example, reg_script.obj.
The linker then takes all the .obj files and puts them together into an executable. At this point, it expects to find and sort out all the different functions that were declared to exist somewhere "out there" at the compilation stage. If it doesn't find one, it gets very upset. (It has experienced a lot of losers over the years, and it never believes the check is in the mail).
So if you don't tell the compiler to compile io.cpp, and then tell the linker to include io.obj when linking, this will occur, and you will get that error.
And yes, you will get different errors if you #include a .cpp, most likely. Sadly, I don't know how to use cmake. I'll go try to find out though.