Error message don't know what it meens
Hello,
It seems I am getting a very annoying error message...it's a WIN32 tiny project.(just a message box)
Here's my code:
#include <windows.h> // include the basic windows header file
// the entry point for any Windows program
int WINAPI WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nShowCmd)
{
// create a "Hello World" message box using MessageBox()
MessageBox(NULL,
L"Hello World!",
L"Just another Hello World program!",
MB_ICONEXCLAMATION | MB_OK);
// return 0 to Windows
return 0;
}
Now the error message I'm getting:(the whole log)
------ Build started: Project: tutorial31, Configuration: Debug Win32 ------
Compiling...
tutorial31.cpp
Compiling manifest to resources...
Linking...
tutorial31.obj : error LNK2019: unresolved external symbol __imp__MessageBoxW@16 referenced in function _WinMain@16
MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
C:\Documents and Settings\Compaq_Owner\My Documents\Visual Studio 2005\Projects\tutorial31\Debug\tutorial31.exe : fatal error LNK1120: 2 unresolved externals
Build log was saved at "file://c:\Documents and Settings\Compaq_Owner\My Documents\Visual Studio 2005\Projects\tutorial31\tutorial31\Debug\BuildLog.htm"
tutorial31 - 3 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I'm new to Win32 so if it's something obvious please don't get made. >.>
Thanks guys!
I'm getting anouther error.. >> could someone help please ty
------ Build started: Project: Raxisesss, Configuration: Debug Win32 ------
Compiling...
Tehpwn.cpp
Compiling manifest to resources...
Linking...
MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
C:\Documents and Settings\Compaq_Owner\My Documents\Visual Studio 2005\Projects\Raxisesss\Debug\Raxisesss.exe : fatal error LNK1120: 1 unresolved externals
Build log was saved at "file://c:\Documents and Settings\Compaq_Owner\My Documents\Visual Studio 2005\Projects\Raxisesss\Raxisesss\Debug\BuildLog.htm"
Raxisesss - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
btw I quickly typed Raxisesss I just felt like doing that.
------ Build started: Project: Raxisesss, Configuration: Debug Win32 ------
Compiling...
Tehpwn.cpp
Compiling manifest to resources...
Linking...
MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
C:\Documents and Settings\Compaq_Owner\My Documents\Visual Studio 2005\Projects\Raxisesss\Debug\Raxisesss.exe : fatal error LNK1120: 1 unresolved externals
Build log was saved at "file://c:\Documents and Settings\Compaq_Owner\My Documents\Visual Studio 2005\Projects\Raxisesss\Raxisesss\Debug\BuildLog.htm"
Raxisesss - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
btw I quickly typed Raxisesss I just felt like doing that.
You've created a console application instead of a Win32 application. Either re-create the project as a Win32 application, or go to project settings (Alt+F7) -> Configuration Properties -> Linker -> System -> SubSystem and change it from "Console (/SUBSYSTEM:CONSOLE)" to "Windows (/SUBSYSTEM:WINDOWS)"
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement