How to resolve hidden symbol linking error



  • I am able to make static libraries of

    1. libQtCore.a and libQtGui.a
    2. libqwts.co (recompiled without which is recompiled without dependencies on runtime QT libraries) . but I am getting this following error

    hidden symbol `_ZNK7QLayout11minimumSizeEv' in libQtGui.a(qlayout.o) is referenced by DSO

    This is happening because by default when static libraries are built the fvisibility=hidden -fvisibility-inlines-hidden for compiling all the cpp files of Qt code . When I remove this flag , I am able to link the libraries

    What is correct solution to remove the linking error hidden symbol `_ZNK7QLayout11minimumSizeEv' is referenced by DSO is referenced by DSO

    Also I have a query I make shared library with the same code base of QtCore and QtGui and also CXXFLAGS -fvisibility=hidden and when I link the shared libraries libQtCore.so and libQtGui.so in my final executable then it works fine and I do not get any linker error


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.