您的位置:首页 > 其它

压缩VC编译文件的体积

2008-03-22 15:53 218 查看
///////////////////////////////////////////////////////////////////////////////////

//自定义加载的库
#pragma comment(lib,"kernel32.lib")
#pragma comment(lib,"shell32.lib")
#pragma comment(lib,"msvcrt.lib")
//自定义函数入口
#pragma comment(linker, "/ENTRY:EntryPoint")
//自定义对齐方式
#pragma comment (linker, "/ALIGN:512")
#pragma comment(linker, "/FILEALIGN:512")
// 优化选项
#pragma comment(linker, "/subsystem:windows")
#pragma comment(linker, "/opt:nowin98")
#pragma comment(linker, "/opt:ref")
#pragma comment (linker, "/OPT:ICF")
// 合并区段
#pragma comment(linker, "/MERGE:.rdata=.data")
#pragma comment(linker, "/MERGE:.text=.data")
#pragma comment(linker, "/MERGE:.reloc=.data")

int WINAPI WinMain( HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int iCmdShow ) ;

void EntryPoint()
{
ExitProcess(WinMain(GetModuleHandle(NULL), NULL,
GetCommandLine(), SW_SHOWNORMAL));
}
/////////////////////////////////////////////////////////////////////////////////////////////////
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐