Nytro Posted November 15, 2011 Report Posted November 15, 2011 Building small exe in VC++ 2010 li0n.coderhi allthis is my first post at this amazing forumin this tutorial i will guide you step by step to make smallest possible native win32 application by using Visual C++ 2010 Expressthe reason for this tutorial is that VS 6.0 is very old but most people still use it because it makes small native exealso most projects were made by VS 6.0 so it is hard for some to convert it to the new edition of VS1- download and install Visual C++ 2010 Express (free)2- File>New>project3- choose win32 project , let us name it smallexe, then press ok4- new windows will pop up, click next5- check empty project then click finish6- go to project>add new item>c++ file> let us name it main , then press ok7- paste this code which show simple message box#include <windows.h>int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow){ MessageBoxA(NULL,"my small exe!","info",0); return 0;}8- now go to project>properties9- press configuration manger and set active solution configuration to "release" then close10- [optional step] many codes around will generate errors when you build it , simply because they were written in VS 6.0 and they don't support Unicode, if you don't know how to convert the project to Unicode we can disable this featureconfiguration properties>character set>change to "not set"11- go to C/C++>optimization>optimization>choose minimize size12- go to C/C++>code generation>run time library>choose multi threaded dll (/MT)why ? this option will Remove dependency of msvcr100.dll which is not available natively on windows xp13-go to linker>manifest file>generate manifest>choose no14-go to linker>debugging>generate debug info>choose no15-go to linker>advanced>entry point> write WinMain16- build the projectyaaaay 2.5kb app, that run without any dependency !!when you write bigger project use minicrt.lib[download from attachments], it also will decrease the sizelinker>input>additional dependencies> write minicrt.lib;hope it works with you guys Sursa: ic0de.org Quote