Sign in to follow this  

Error message don't know what it meens

This topic is 3587 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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!

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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)"

Share this post


Link to post
Share on other sites

This topic is 3587 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this