0

I built application with gcc on linux host (x86_64) and it linked to exact version number of a shared libs. I specify linker option -lQt5Core, but application links to libQt5Core.so.5.3.1.

How to build application which would be linked with common version of a shared library like libQt5Core.so.5?

So I would like link my application to libQt5Core.so.5, not to libQt5Core.so.5.3.1. How to do it?

Thanks.

Niall
  • 30,036
  • 10
  • 99
  • 142
  • possible duplicate of [How to specify the library version to use at link time?](http://stackoverflow.com/questions/3840218/how-to-specify-the-library-version-to-use-at-link-time) – bobah Oct 06 '14 at 09:57
  • Nope it is no duplicate. I want to build application linked to common version of libraries. Purpose is built packages for gentoo or Arch(AUR) linked to common lib versions. Because after update boost libs most of application wont work. For example after updating boost from 1.55 to 1.56 most applications doesnt work because they still linked to boost 1.55. I just want to link applications to boost 1. – Maksym Telychko Oct 06 '14 at 10:14

1 Answers1

0

You can use specify exact the library version

-l:libQt5Core.so.5

or give the directory you want to search for.

-lQt5Core -L _LIB_PATH_  // _LIB_PATH_ is the path where the library you want to link is.
JHT
  • 72
  • 5