When you declare (in Code::Blocks) a project as being dependent on another project, it only affects the order of the project builds, i.e. myProject is built before myProjectTesting in your case.
You still have to manually add the library myProject to the libraries being linked to from myProjectTesting, or else you will experience unresolved symbols, like you have seen.