Discussion:
smallest file size using argc, argv
(too old to reply)
AG
2010-09-25 18:27:42 UTC
Permalink
Hi there,

I have the following code:

int main(int argc, char * argv[])
{
if(argc!=2) return -1;
else
{
if (argv[1][0]='o') return 0;
else return 1;
}
}

I don't need any library for that. So I ignored all default library,
set the entry point to main, took off the basic runtime checks, and
removed the manifest file.

Though when I do that, argc and argv are not taken into account
anymore. Is this because I removed the default libraries, or is it
because of something else (like an option that I should activate...
like the calling convention ?)

I want the smallest executable as possible.

Thanks in advance for your help.

AG.
AG
2010-09-25 20:02:01 UTC
Permalink
apparently, it is not possible to have a custom entry point function
with command line arguments.... ?

http://msdn.microsoft.com/en-us/library/f9t8842e%28VS.80%29.aspx

Is that right ?

Loading...