pro-file: force link with static library
-
Hello, I use Qt-5.11.1 and QWebSockets, for this I add
QT += websockets
to pro-file.
I can build shared and static libQt5WebSockets, but how can I force link with static library in pro-file?
Thank you excuse my bad english.@debian said in pro-file: force link with static library:
I can build shared and static libQt5WebSockets, but how can I force link with static library in pro-file?
it depends which Qt kit you are using in the end. The linked lib decides if it's static or dynamic.
You can't mix them anyway in a single Qt installation. -
@debian said in pro-file: force link with static library:
I can build shared and static libQt5WebSockets, but how can I force link with static library in pro-file?
it depends which Qt kit you are using in the end. The linked lib decides if it's static or dynamic.
You can't mix them anyway in a single Qt installation.@raven-worx sorry, I not understand.
If I have both, static and shared, libraries in same directory linker choose shared libraries, how can I force use static library in this case? -
@raven-worx sorry, I not understand.
If I have both, static and shared, libraries in same directory linker choose shared libraries, how can I force use static library in this case?@debian said in pro-file: force link with static library:
If I have both, static and shared, libraries in same directory linker choose shared libraries, how can I force use static library in this case?
exactly. why do you have static and dynamic libs in the same folder in the first place?!
-
Why not?
So I can't force use static library in pro-file and should story static and shared libraries in different directories?
Thank you.@debian said in pro-file: force link with static library:
So I can't force use static library in pro-file and should story static and shared libraries in different directories?
exactly, thats what i already said.
Your Qt installation should either be compiled dynamic or static.the main reason is:
QT += websockets
adds linker commands for a specific lib name to the makefile for build.You renamed your static libs and copied them beside the dynamic ones?