[Qt-interest] Adding libraries to .pro file

David Boosalis david.boosalis at gmail.com
Thu Oct 21 16:35:13 CEST 2010


 I noticed the lib you lbuild against  is libTableModel.so.1.0.0 and the one
the program wants to load is libTableModel.so.1.  Note they have different
endings.  The latter is most likely a symbolic link to the first one.

>From the command line type "ldd <exectablename>" and see what it wants to
link against.  You may need to put the path to the symbolic link in your
LD_LIBRARY_PATH, or create the symbolic link yourself (see the "ln"
command).

Hope this is of some help

-David


On Thu, Oct 21, 2010 at 4:21 AM, Chasc <chasc at tpg.com.au> wrote:

> Hi,
>
> I am having trouble linking a shared library I have created into my
> current application. My project file reads as follows:
>
> LIBS += -L/home/pcor/Development/cpp/qt/libs/TableModel-build-desktop
> LIBS += -llibTableModel
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20101021/8f29eea0/attachment.html 


More information about the Qt-interest-old mailing list