Hi, I was in some sort of problem just like that. I'll be more specific:
I have a project with 3 more projects inside (subdirs). One for app (widgets) and others as static libs. So the idea is to call throught app the last lib. Something like: First lib goes asks for last lib to do some task, this task is to do some query. Compiling each of one alone does not get me errors, but when I ask for a build all, my last libs says it does not find QSqlDatabase.