#include <windows.h>
//库
#pragma comment(lib,"kernel32.lib")
#pragma comment(lib,"shell32.lib")
#pragma comment(lib,"msvcrt.lib")
//入口函数
#pragma comment(linker, "/ENTRY:EntryPoint")
//对齐方式
#pragma comment(linker, "/FILEALIGN:512")
#pragma comment(linker, "/opt:ref,ICF")
//合并区段
#pragma comment(linker, "/MERGE:.rdata=.data")
#pragma comment(linker, "/MERGE:.text=.data")
#pragma comment(linker, "/MERGE:.reloc=.data")
//设置区段属性
#pragma comment(linker, "/section:.data,RWE")
int WINAPI WinMain( HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int iCmdShow )
{
MessageBox(0, "sss", "sss", 0);
return 0;
}
void EntryPoint()
{
ExitProcess(WinMain(GetModuleHandle(NULL), NULL, GetCommandLine(), SW_SHOWNORMAL));
}
减小VC生成的体积
最新推荐文章于 2021-05-18 03:01:03 发布