[Qt-interest] subclassing Sql drivers (linking issue)

Thiago Macieira thiago at kde.org
Tue Feb 23 16:38:57 CET 2010


Em Terça-feira 23 Fevereiro 2010, às 16:22:28, Andre Somers escreveu:
> Andre Somers wrote:
> > Andre Somers wrote:
> >> Hi,
> >> 
> >> I am trying to extend the Qt SQL drivers to add some functionality. I
> >> have the thing compiling, but I run into a problem when linking. I get
> >> lots of "undefined reference" errors like these:
> >> 
> >> C:/projects/srtools/common/ExtendedDatabaseDrivers/accessdriver.cpp:124:
> >> undefined reference to `QODBCDriver::open(QString const&, QString
> >> const&, QString const&, QString const&, int, QString const&)'
> >> 
> >> for all the methods that I subclassed (or are done so by moc). Yes, I
> >> have included the Q_OBJECT macro.
> >> 
> >> This particular driver is trying to extend the QODBCDriver to specialize
> >> it for using with Microsoft Access. T
> >> The issue *seems* to be that if I include the sql module, I am not there
> >> yet. I guess I have to link to the driver lib itself in some way, but I
> >> don't really see how. However, I may be off the mark.
> >> 
> >> Any hints are appreciated.
> >> 
> >> André
> > 
> > I tried adding the drivers lib to the libs to link with like this:
> > LIBS += -lqsqlodbc4 -L$$[QT_INSTALL_PLUGINS]/sqldrivers
> > 
> > However, that did not fix the issue.
> > 
> > André
> 
> Nobody?

Change Qt code and recompile the driver.

The driver is not a library. You cannot link to it.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Product Manager - Nokia, Qt Development Frameworks
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100223/7ee45be9/attachment.bin 


More information about the Qt-interest-old mailing list