Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

smallest file size using argc, argv

11 views
Skip to first unread message

AG

unread,
Sep 25, 2010, 2:27:42 PM9/25/10
to
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

unread,
Sep 25, 2010, 4:02:01 PM9/25/10
to
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 ?

0 new messages