首页| 论坛| 消息

标题:【提问】一个重要的问题,就是怎么样静态连接,让可执行程序脱离运行环境
作者:hetal
日期:2005-10-25 17:26
内容:

1.我在官方网上查了很多,没有收活
2.我在手册上发现了如下几点,不过还是不知道是怎么弄的
QMAKE_CFLAGS_MT
This variable contains the compiler flags for creating a multi-threaded application or when the version of Qt that you link against is a multi-threaded statically linked library. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.
QMAKE_CFLAGS_MT_DBG
This variable contains the compiler flags for creating a debuggable multi-threaded application or when the version of Qt that you link against is a debuggable multi-threaded statically linked library. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.
POST_TARGETDEPS
All libraries that the target depends on can be listed in this variable. Some backends do not support this, these include MSVC Dsp, and ProjectBuilder .pbproj files. Generally this is support internally by these build tools, this is usefull for explicitly listing dependant static libraries.
This list will go after all builtin (and $$PRE_TARGETDEPS) dependencies.
PRE_TARGETDEPS
All libraries that the target depends on can be listed in this variable. Some backends do not support this, these include MSVC Dsp, and ProjectBuilder .pbproj files. Generally this is support internally by these build tools, this is usefull for explicitly listing dependant static libraries.
This list will go before all builtin dependencies.
还望高手指点


#1 [myer 10-26 08:13]
安装编译的时候,采用静态编译
具体参考:
configure -help
#2 [hetal 10-26 09:24]
在windows下,又怎么办呢?
而且我试过了修改Makefile,加了-static 不过编译出来还是不行,要依赖其运行环境
#3 [荒野大镖客 10-26 19:05]
不行滴~要带2个运行库,有几M大呢
#4 [hetal 10-31 14:25]
确实很郁闷,这样对发布不好,我想是肯定有的,只是我没有找到办法
#5 [坤义 04-11 16:39]
我也碰到这样的问题了 顶啊 高人帮忙啊

<< 1 2 >> (1/2)

回复 发表
主题 版块