• 5061阅读
  • 3回复

为什么用qt编出的动态苦很大,比vc编出的大很多 [复制链接]

上一主题 下一主题
离线fcfan
 

只看楼主 倒序阅读 楼主  发表于: 2009-04-20
— 本帖被 XChinux 执行加亮操作(2009-04-22) —
rt,编译环境是XP, Qt Creator 1.0, 默认设置,release 编出居然450 k, vc下100k都不到,请各位大虾帮忙,多谢!
离线steinlee

只看该作者 1楼 发表于: 2009-04-21
try not to include all header files in all .h files. Instead define the variables with class names if possible.
For example:

replace your code like

#include "B.h"

class A
{
public:
    B * b;
}

with

class B;

class A
{
public:
    B * b;
}

put include "B.h" in A.cpp

It may help a bit and also compiling may be faster.
Looking for remote C/C++ and Qt 兼职
离线fcfan

只看该作者 2楼 发表于: 2009-04-21
我试试
离线XChinux

只看该作者 3楼 发表于: 2009-04-22
编译器不一样,编译出来的文件大小也不一样。
二笔 openSUSE Vim N9 BB10 XChinux@163.com 网易博客 腾讯微博
承接C++/Qt、Qt UI界面、PHP及预算报销系统开发业务
快速回复
限100 字节
 
上一个 下一个