It's hard to say, since the source code is actually not that useful for linker errors. If the linker says that it cannot find the function, then you are not linking the correct libraries, regardless of whether the source was compiled or not.
One thing I would be looking for does not make sense to simply specify library directories, as they simply provide different search paths for searching when searching for libraries. You still need to specify the actual library with which you want to link.
This is one of the possible reasons based on the information in your question.
source share