Tag: 加壳

UPX: the Ultimate Packer for eXecutables

Posted by – June 2, 2010


<UPX logo>

UPX is a free, portable, extendable, high-performance executable packer for several different executable formats. It achieves an excellent compression ratio and offers very fast decompression. Your executables suffer no memory overhead or other drawbacks for most of the formats supported, because of in-place decompression.

UPX is copyrighted software distributed under the terms of the GNU General Public License, with special exceptions granting the free usage for commercial programs as stated in the UPX License Agreement.

UPX uses the NRV compression library for compression services. A compatible but somewhat less efficient OpenSource implementation is available through the UCL compression library.

UPX aims to be Commercial Quality Freeware.


Posted by – March 13, 2010

解决QT静态编译和debug库问题(mingwm10.dll丢失、collect2:ld returned 1 exit status)

平台:windows7   软件:qt4.6+qt creator 1.3     使用的安装包是  qt-sdk-win-opensource-2009.05.exe

(1)使用 qt creator 生成工程,写好程序进行编译运行,在qt creator点击运行,程序能跑起来,没问题,可是我在工程目录下找到编译生成的程序双击运行时,提示缺少mingwm10.dll,无法运行。
(2) 按照 http://wiki.qtcentre.org/index.php?title=Building_static_Qt_on_Windows#MinGW 这个方法完成操作以后,使用qt creator 不能用debug,只能使用release选项,使用debug选项产生的错误提示是:collect2:ld returned 1 exit status    通过查找资料发现是缺少debug库

(1)编辑 C:\Qt\2009.05\qt\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)在开始菜单里找到Qt Command Prompt并运行,输入命令:   configure -static -debug-and-release -no-exceptions
(3)上一条命令运行成功后再输入命令:   mingw32-make sub-src
等1 ~3 小时可能就运行完了   完成后就ok了。。。

Q: 首先得谢谢楼主让我解决了不能debug的问题。。。但是又产生了新的问题,现在debug生成的可执行文件太大了。。。一百多兆啊,release生成的才八九M。。。这是怎么回事儿呢?

A: Debug时当然用debug了,大一点没关系。Debug 完之后正式发布软件再用release编译一遍。然后还可以strip(Linux 程序) 一下exe、在upx(http://upx.sourceforge.net/#download)一下exe和dll,体积会非常小。