Unsolved Change order of the parameters passed to g++
-
Hello,
I am trying to statically link stdc++ to my binary using -static-libstdc++ and -static-libgcc on Ubuntu. Its always linked dynamically and the problem seems to be that the mkspec tree is putting them immediately after g++. I tested it with simple c++ example and the linker only links the lib if the parameters are passed at the end.
I'm not sure if its the real problem with Qt static lib linking but i don't know how to customize it and test.Thanks!
-
Since you narrowed the problem down to mkspecs - modify the definitions you are using to fix the problem. The only issue with such solution is that you need to repeat the process (or copy-paste your custom mkspecs) to all Qt versions you are using.
-
If there is another way i would prefer to not change mkspecs, but i cant compile my project with static c++ libs in any way.
-
Just to be sure: using QMAKE_LFLAGS does not help either?
-
@sierdzio said in Change order of the parameters passed to g++:
Just to be sure: using QMAKE_LFLAGS does not help either?
No, i tried in LIBS, CONFIG, QMAKE_FLAGS{DEBUG/RELEASE} - without success. Compiling any regular c++ with g++ works.
-
-
@jsulm said in Change order of the parameters passed to g++:
QMAKE_LFLAGS
Ah sorry, i just copy his replay. I meant QMAKE_LFLAGS and QMAKE_CXXLAGS
-
Could anyone help please?