0

This works:

int main( int argc, char *argv[])
{
....
gtk_init(&argc, &argv);
....

But this doesn't:

int WINAPI WinMain (HINSTANCE p1, HINSTANCE p2, LPSTR argv, int argc) { 
....
gtk_init(&argc, &argv);
....

Can someone point out what's wrong there?

user198729
  • 61,774
  • 108
  • 250
  • 348

1 Answers1

5

WinMain does not provide you with argc and argv - see http://msdn.microsoft.com/en-us/library/ms633559%28VS.85%29.aspx. You get the command line as a single string (the third parameter) which you have to parse yourself.