[Qt-interest] Adding libraries to .pro file

Mandeep Sandhu mandeepsandhu.chd at gmail.com
Thu Oct 21 15:06:35 CEST 2010


> LIBS += -L/home/pcor/Development/cpp/qt/libs/TableModel-build-desktop
> LIBS += -llibTableModel

This should be:

LIBS += -lTableModel

(you should skip the 'lib' prefix)

...and update your LD_LIBRARY_PATH as mentioned in an earlier reply.

HTH,
-mandeep


> INCLUDEPATH
> += /home/pcor/Development/cpp/qt/libs/TableModel-build-desktop
>
> where libTableModel.so is a link pointing to libTableModel.so.1.0.0 in
> the
> directory /home/pcor/Development/cpp/qt/libs/TableModel-build-desktop.
> My header files are also in this same directory.
>
> I can build the project OK but when I try running it I get:
>
> /home/pcor/Development/cpp/qt/TableSelection2/TableSelection2-build-desktop/TableSelection2: error while loading shared libraries: libTableModel.so.1: cannot open shared object file: No such file or directory
>
> every time. My platform is Linux and I am using Qt Creator 2.0.1. Can
> anyone help me with this?
>
> Paul Cornford (newbie)
>
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>



More information about the Qt-interest-old mailing list