qt4 - How can I add the QtSql library in Qt creater? -


when compile codes has database connection, there's error like,

 qtsql: no such file or directory 

i suppose sql library must in qt, dont have idea why error occured ? enable database's libraries? can me please, thanks

from qtsql documentation,

in .pro file have add,

qt += sql 

afaik there no separate library included sql modulue. it's enough if add above line .pro file.

since not aware of adding libraries,

from qmake documentation, libraries can added using libs keyword.

an example same documentation itself..

unix:libs += -lmath -l/usr/local/lib win32:libs += c:\mylibs\math.lib 

hope helps.


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -