WinMain ???

L

Lloyd Dupont

I don't understand !!!!!!

Sometimes VS.NET seems to compile fine with a "int main(int, char*)"
function
sometimes not...

worst recently I had a project which (for some reasons) didn't like "main()"
startup function and, copying from a similar project, I use the following
entry point:

int APIENTRY _tWinMain(HINSTANCE, HINSTANCE, LPTSTR, int);

It works fine for a while then I played a bit with the project property
(just adding a new library and header include path and a new library) and
suddenly the project didn't link any longer complaining WinMain@16 is
missing !

what the hell is that !!??!!
 
R

red floyd

Lloyd said:
I don't understand !!!!!!

Sometimes VS.NET seems to compile fine with a "int main(int, char*)"
function
sometimes not...

worst recently I had a project which (for some reasons) didn't like "main()"
startup function and, copying from a similar project, I use the following
entry point:

int APIENTRY _tWinMain(HINSTANCE, HINSTANCE, LPTSTR, int);

It works fine for a while then I played a bit with the project property
(just adding a new library and header include path and a new library) and
suddenly the project didn't link any longer complaining WinMain@16 is
missing !

what the hell is that !!??!!

Console apps get "int main(int, char *[])";
Win32 GUI Apps get "int APIENTRY WinMain(HINSTANCE, HINSTANCE, LPTSTR, int)"
 
L

Lloyd Dupont

thanks, I found it !

red floyd said:
Lloyd said:
I don't understand !!!!!!

Sometimes VS.NET seems to compile fine with a "int main(int, char*)"
function
sometimes not...

worst recently I had a project which (for some reasons) didn't like "main()"
startup function and, copying from a similar project, I use the following
entry point:

int APIENTRY _tWinMain(HINSTANCE, HINSTANCE, LPTSTR, int);

It works fine for a while then I played a bit with the project property
(just adding a new library and header include path and a new library) and
suddenly the project didn't link any longer complaining WinMain@16 is
missing !

what the hell is that !!??!!

Console apps get "int main(int, char *[])";
Win32 GUI Apps get "int APIENTRY WinMain(HINSTANCE, HINSTANCE, LPTSTR, int)"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top