Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in
read-only mode
.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
Hi all
I'm trying to compile my Qt application by using Qt libraries in dynamic mode and, in my intention, by linking statically all other gcc libraries (like, for example, libstdc++). Unfortunately I still didn't find a way for this.
Currently I made some test using the QMAKE_LFLAGS option into the Qt Creator .pro file as follow:
@QMAKE_LFLAGS += -static-libstdc++@
but using the ldd tool I can see the libstdc++ is still linked dynamically (libstdc++.so.6). If I try the following solution:
@QMAKE_LFLAGS += -static@
The linker return error since want to have all the libraries in static format and, obviously, doesn't find the Qt static libraries.
Someone know the correct way to make such result?
Thank you
Thank you for your help.
At which level I should to modify path? (linker?) Something like:
@QMAKE_LFLAGS += -Wl,-rpath,/path_to_static_libstdc++/@
I'm still facing this issue.
Tried add this flag:
@QMAKE_LFLAGS += -static-libgcc -static-libstdc++@
but no effect, libstdc++ still linked dynamically.
Tried also:
@QMAKE_LFLAGS += -Wl,-b-static-libgcc -Wl,-b-static-libstdc++@
but linker return this error:
@:-1: error: invalid BFD target `-static-libstdc++'@
I can't believe there is no way to link statically libstdc++
Thank you for your reply.
Unfortunately your suggestion doesn't work, libstdc++ still linked dynamically. I already tried similar test by additing the
@LIBS += -L/usr/lib/gcc/i486-linux-gnu/4.7@
flasg bug same result...