MinGW靜態編譯
1.修改mkspecs/win32-g++目录下的配置文件qmake.conf
将下面一行:
QMAKE_LFLAGS = -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc
修改为:
QMAKE_LFLAGS = -static -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc
2.然后将下面一行:
QMAKE_LFLAGS_DLL = -shared
修改为:
QMAKE_LFLAGS_DLL = -static
沒有留言:
張貼留言