Tharanga
Tharanga

Reputation: 2097

Qt winmigrate framework

I tried running one of the winwidget with mingw compiler. but it keeps looking for a qmain method. I can run this example with visual studio compiler with out an issue. has anyone got any advice on this.

Upvotes: 1

Views: 294

Answers (1)

Tharanga
Tharanga

Reputation: 2097

After head banging for days found a solution for this. There is a slight tweek needed to be done in order to sort this out.

Actually the component compile just fine except for the qwinwidget example. So I replaced the main method (supported by visual studio compiler) to the one supported by mingw supported main method.

//This part is for the mingw

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
}

//This is for the visual studio

int APIENTRY wWinMain(HINSTANCE hInstance,
              HINSTANCE /*hPrevInstance*/,
              LPTSTR    /*lpCmdLine*/,
              int       nCmdShow)
{
}

I appreciate of some one can confirm this.

Upvotes: 1

Related Questions