首页
社区
课程
招聘
[求助]忘记VC怎么设置编译连接选项才能生成体积小的文件了,求助
发表于: 2013-4-11 09:18 4512

[求助]忘记VC怎么设置编译连接选项才能生成体积小的文件了,求助

2013-4-11 09:18
4512
忘记VC怎么设置编译连接选项才能生成体积小的文件了,求助

以前在网上看过,在VC里写上#pragram *****后,生成的二进文件体积会变小,所说几十K的程序会变成几k.只是我忘记了这些资料是怎么写的了,有大牛麻烦告知一下

#pragma comment(linker, $%^&*( 好像大约大概是这般这样的

[课程]Linux pwn 探索篇!

收藏
免费 0
支持
分享
最新回复 (2)
雪    币: 22
活跃值: (423)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
2
http://wenku.baidu.com/view/ccb4064dfe4733687e21aaab.html
2013-4-11 09:24
0
雪    币: 599
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
3
google下tiny.h
From tiny.h:
#ifdef NDEBUG
// /Og (global optimizations), /Os (favor small code), /Oy (no frame pointers)
#pragma optimize("gsy",on)

#pragma comment(linker,"/RELEASE")

// Note that merging the .rdata section will result in LARGER exe's if you using
// MFC (esp. static link). If this is desirable, define _MERGE_RDATA_ in your project.
#ifdef _MERGE_RDATA_
#pragma comment(linker,"/merge:.rdata=.data")
#endif // _MERGE_RDATA_

//#pragma comment(linker,"/merge:.text=.data")
#pragma comment(linker,"/merge:.reloc=.data")

#if _MSC_VER >= 1000
// Only supported/needed with VC6; VC5 already does 0x200 for release builds.
// Totally undocumented! And if you set it lower than 512 bytes, the program crashes.
// Either leave at 0x200 or 0x1000
#pragma comment(linker,"/FILEALIGN:0x200")
#endif // _MSC_VER >= 1000

#endif // NDEBUG

#pragma comment(linker,"/ENTRY:WinMain")
//#pragma comment(linker,"/MERGE:.rdata=.data")
//#pragma comment(linker,"/MERGE:.text=.data")
#pragma comment(lib,"msvcrt.lib")
#if (_MSC_VER < 1300)  
        #pragma comment(linker,"/IGNORE:4078")  
        #pragma comment(linker,"/OPT:NOWIN98")
#endif
#define WIN32_LEAN_AND_MEAN
2013-4-11 09:56
0
游客
登录 | 注册 方可回帖
返回
//