3

I'd been looking for a DB access library for C++ which will run under Windows. I tried

  • SOCI: does not compile
  • SQLAPI++: not free

Next option was to use Qt's DB access module, QtSql.

Is it possible only to use QtSql without importing or linking any other Qt stuff?

Joachim Sauer
  • 302,674
  • 57
  • 556
  • 614
Hayri Uğur Koltuk
  • 2,970
  • 4
  • 31
  • 60

1 Answers1

3

Yes you can compile against only a part of the Qt Dlls. But I guess in all cases you have to build against QtCore too. So your .pro file should have

qt += core sql
Patrice Bernassola
  • 14,136
  • 6
  • 46
  • 59
  • Hi, i don't have a pro file, i use vs2005. Can i simply add lib files for core and sql, and then i'm done? note: project is not a qt project, in short i just wanna use a couple of qt classes. – Hayri Uğur Koltuk Jun 01 '11 at 07:48
  • Yes it's possible. Qt dll are independent (except with the core) – Patrice Bernassola Jun 01 '11 at 10:13
  • Be very careful with QtSql since Sql drivers are plugins, they need a proper Qt plugin file structure to be loaded (they may need a QApplication too depending the way you build it) – Thomas Vincent Jun 01 '11 at 13:35