Need help on simple code

Posts 15 of 5 · Page 1 of 1
Need help on simple code
Guys, my compiler is saying that is an error in the code that I created

Here is the error log:

Code:
1>------ Build started: Project: This, Configuration: Debug Win32 ------
1>Linking...
1>MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
1>C:\Users\Familia Belem\Documents\Visual Studio 2008\Projects\Project1\This\Debug\This.exe : fatal error LNK1120: 1 unresolved externals
1>Build log was saved at "file://c:\Users\Familia Belem\Documents\Visual Studio 2008\Projects\Project1\This\This\Debug\BuildLog.htm"
1>This - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Code:
Code:
#include <windows.h>    


int WINAPI Main(HINSTANCE hInstance,
                HINSTANCE hPrevInstance,
                LPSTR lpCmdLine,
                int nShowCmd)
{
    MessageBox(NULL,
               L"Hack criado no dia 06/01/10",
               L"Felipeb18's hack",
               MB_ICONEXCLAMATION | MB_OK);
    return 0;
}
Plz help me!!!
int WINAPI WinMain(don't know the exact params off the top of my head) or int main()
instead of
int WINAPI Main(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nShowCmd)


use:

int WINAPI WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nShowCmd)
Ive already tried this.
But I think its something wrong with the header because any code that i put using windows.h is giving the same error
Posts 15 of 5 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?