Build PostgreSQL driver for Qt 4.7.4 on GNU/Linux

Hello,
I'm trying to build the qsql_psql driver on Fedora 15 by following the documentation. First in the src directory, instead of a .pro file, I find qsql_psql.pri. After qmake, I type make, I have the error
@qsql_psql.cpp:48:23: fatal error: qsqlerror.h: No such file or directory@
So I add @QT += sql@ in qsql_psql.pri
But, now when I try to build it I have this error
@/usr/lib/gcc/i686-redhat-linux/4.6.0/../../../crt1.o: In function _start': (.text+0x18): undefined reference tomain'@
It's looking for a main method. Why ? How to build it ?
Thanks.