[SOLVED] QtCreater uses different libraries
-
Hi,
I have a weird problem with my Qt Creator in Linux (Linux Mint/Ubuntu).
So, I have a projects, which uses a modified version of libexif.
I changed this library really often, because I added TIFF support for it and also want to read unknown Exif tags. In that case, i replaced libexif in /usr/lib/i386-linux-gnu and in /usr/lib/x86_64-linux-gnu with my compiled version and have it also in my project directory.I have create a Qt project, which uses my libexif library, but it seems to be, that it is using an older version of my library and I don't know, where it is.
I tried it with ldd, and got following result, when I use a normal terminal (no Qt Creator):
libexif.so.12 => /usr/lib/i386-linux-gnu/libexif.so.12 (0x00007fb8c8c1f000)
It also works, if I started it directly.In QtCreator, I added a user-defined command after compiling, which only execute ldd.
The output is the same:
libexif.so.12 => /usr/lib/i386-linux-gnu/libexif.so.12 (0x00007f436b8fd000)But when I start it, the library is not working correctly because it uses an oleder version of my library.
Any hints?
-
Did you check on LIBS += -llibexif -Lpath/to/libfolder
Also did you check the link "here":http://doc.qt.digia.com/qtcreator-2.3/creator-project-qmake-libraries.html -
I would suggest to do not mess with the system libraries. You may get them replaced by update.
Put your libexif to some location in your home or build directory and use LD_LIBRARY_PATH to point to this location.
Also it will help to identify when application is using your library. -
libexif are not really in development, so I would see, if a update comes. Also, I would get a typical compiling error.
I take a look in the QtCreator build environment and I noticed, that it is using another library path.
LIBS += -llibexif -Lpath/to/libfolder doesn't work, because it takes first the library in the system folder instead of my version.
Thanks all for their help!