To compile your application without the C-Runtime library (CRT), use the /MT , /NODEFAULTLIB /MT linker options and override the entry point in Linker -> Advanced -> Entry Point for the function defined in your code, for example. rawMain . Signature:
DWORD CALLBACK rawMain();
Without the C-runtime library, you are not allowed to use its functions, such as malloc , free , memset , etc. You must implement all the used CRT functions yourself. For example. you can replace using malloc with VirtualAlloc() and free with VirtualFree() .
To verify that C-runtime is not associated with your application, use Dependency Walker .
Nikita
source share