
Originally Posted by
bnilsson
1)
Does this require two separate Qt installations, or can Qt shared debug and Qt static release co-exist in the same Qt directory?
They should be in different directories.
If they can co-exist in the same Qt directory, what preparations are necessary (such as nmake distclean or nmake clean etc.) before the second installation?
You'd have to compile one of them with some library prefix or suffix so that library names do not clash (i.e. have "QtCore" and "QtCore_static" libraries) and adjust specs accordingly.
2)
Is it possible to have a .vcproj project where the debug configuration is using shared libraries and the release configuration is using static link? if the answer is yes, how should this be done?
Sure.
CONFIG(debug, debug|release) {
LIBS += -lsomelib
}
CONFIG(release, debug|release){
CONFIG += static
# static build may require changing some of the compiler flags, i.e. for MSVC
...
LIBS += somelib.a
# etc.
}
CONFIG(debug, debug|release) {
LIBS += -lsomelib
}
CONFIG(release, debug|release){
CONFIG += static
# static build may require changing some of the compiler flags, i.e. for MSVC
...
LIBS += somelib.a
# etc.
}
To copy to clipboard, switch view to plain text mode
Bookmarks