Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QMAKE_LFLAGS_SONAME - how I use it?
Qt 6.11 is out! See what's new in the release blog

QMAKE_LFLAGS_SONAME - how I use it?

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 1.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    braboar
    wrote on last edited by
    #1

    In one of my projects I must provide the same name of shared libraries under windows and linux (e.g. reg.dll and reg.so).
    To do so, in reg.pro is written:

    @unix {
    QMAKE_LFLAGS_SONAME = -Wl,-soname,reg.so -o reg.so reg.o -lc
    }
    @

    After build was done:
    @g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DREG_LIBRARY -DQT_NO_DEBUG -DQT_PLUGIN -DQT_CORE_LIB -DQT_SHARED -I/usr/lib64/qt/mkspecs/linux-g++-64 -I../Reg -I/usr/lib64/qt/include/QtCore -I/usr/lib64/qt/include -I. -I../Reg -I. -o reg.o ../Reg/reg.cpp
    rm -f libReg.so
    g++ -m64 -Wl,-O1 -Wl,-rpath,/usr/lib64/qt/lib -shared -o libReg.so reg.o -L/usr/lib64/qt/lib -lQtCore -L/usr/lib64/qt/lib -lpthread
    @
    and library name is 'libReg'.

    What I am doing wrong and what must be done to achieve my goal?
    Thanks in advance.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved