[Qt-interest] Library created with QtCreator/QMake

Judy Duncan jduncan at duncanimaging.com
Fri Apr 10 02:48:57 CEST 2009


Hello All,

 

This is largely a Linux question, but I'm confused by the output from the
QMake process and how to use it.  I've written a shared library in QtCreator
(although the library code is plain C code) and am trying to get my Qt
application to find the library.  What do I do with the symbolic links in my
build folder that QMake creates in order to have the system (Ubuntu), find
the library?

 

After the build, I get the shared library and three symbolic links to it. 

(the build folder is /home/judy/DunImg/HGCtrlLib)

libHGCtrlLib.so.1.0.0

symbolic links:

libHGCtrlLib.so.1.0

libHGCtrlLib.so.1

libHGCtrlLib.so

 

When I build a test program in another folder using the project file below,
ld exits with an error saying it cannot find the library.

** Project file ***

CONFIG += qt \

    console

INCLUDEPATH += /home/judy/DunImg/HGCtrlLib

HEADERS += hgctrllib.h

HEADERS += testwin.h, WinTypes.h

SOURCES += testWin.cpp

SOURCES += main.cpp

TARGET = HGTest

LIBS += -L/home/judy/DunImg/HGCtrlLib -lHGCtrlLib

*** end PRO file ***

 

I've trolled the information on the cannot find library error and tried
running ldconfig -v after adding my library folder to the /etc/ld.so.config
file - no luck

*** Output from ldconfig for my library.  (It also calls a commercial
library - libftd2xx.  I don't know where the ref to lib64 is coming from.)
***

/sbin/ldconfig.real: Can't stat /home/judy/DunImg/HGCtrlLib: No such file or
directory

/sbin/ldconfig.real: Path `/usr/local/lib' given more than once

/sbin/ldconfig.real: Can't stat /lib64: No such file or directory

/sbin/ldconfig.real: Path `/usr/lib' given more than once

/sbin/ldconfig.real: Can't stat /usr/lib64: No such file or directory

/usr/local/lib: 

                libftd2xx.so.0 -> libftd2xx.so.0.4.16

/usr/lib:

/sbin/ldconfig.real: Cannot stat /usr/lib/libftd2xx.so: No such file or
directory

*** end - ldconfig output ****

 

What am I missing?

 

Thanks,

Judy

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090409/0ea21aef/attachment.html 


More information about the Qt-interest-old mailing list