Customizing C command-line processing
If your program doesn't take command-line arguments, you can suppress the command-line processing routine to save a small amount of space. To suppress its use, include the noarg.obj
file (for both main
and wmain
) in your /link
compiler options or your LINK
command line.
Similarly, if you never access the environment table through the envp
argument, you can suppress the internal environment-processing routine. To suppress its use, include the noenv.obj
file (for both main
and wmain
) in your /link
compiler options or your LINK
command line.
For more information on runtime startup linker options, see Link options.
Your program might make calls to the spawn
or exec
family of routines in the C runtime library. If it does, you shouldn't suppress the environment-processing routine, since it's used to pass an environment from the parent process to the child process.
See also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for