attempt to fix compilation on windows

This commit is contained in:
csoler 2019-09-08 14:04:39 +02:00
parent 0388702f3d
commit 718a8bafa3
No known key found for this signature in database
GPG Key ID: 7BCA522266C0804C

View File

@ -61,4 +61,47 @@ macx {
INCLUDEPATH += . $$INC_DIR INCLUDEPATH += . $$INC_DIR
} }
win32-g++ {
CONFIG(debug, debug|release) {
# show console output
CONFIG += console
} else {
CONFIG -= console
}
# Switch on extra warnings
QMAKE_CFLAGS += -Wextra
QMAKE_CXXFLAGS += -Wextra
CONFIG(debug, debug|release) {
} else {
# Tell linker to use ASLR protection
QMAKE_LFLAGS += -Wl,-dynamicbase
# Tell linker to use DEP protection
QMAKE_LFLAGS += -Wl,-nxcompat
}
# Fix linking error (ld.exe: Error: export ordinal too large) due to too
# many exported symbols.
QMAKE_LFLAGS+=-Wl,--exclude-libs,ALL
# Switch off optimization for release version
QMAKE_CXXFLAGS_RELEASE -= -O2
QMAKE_CXXFLAGS_RELEASE += -O0
QMAKE_CFLAGS_RELEASE -= -O2
QMAKE_CFLAGS_RELEASE += -O0
# Switch on optimization for debug version
#QMAKE_CXXFLAGS_DEBUG += -O2
#QMAKE_CFLAGS_DEBUG += -O2
OBJECTS_DIR = temp/obj
dLib = ws2_32 gdi32 uuid ole32 iphlpapi crypt32 winmm
LIBS *= $$linkDynamicLibs(dLib)
# export symbols for the plugins
LIBS += -Wl,--export-all-symbols,--out-implib,lib/libretroshare-gui.a
}