Thread: VC++ 2005 Beta Compile problems

  1. #1
    Join Date
    Mar 2005

    Unhappy VC++ 2005 Beta Compile problems

    I am quite new to C++ and have a problem linking the sample "Hello World" windows program. It comes up with a error of: test.obj : error LNK2019: unresolved external symbol __imp__MessageBoxA@16 referenced in function _WinMain@16
    Debug/hello world.exe : fatal error LNK1120: 1 unresolved externals
    . I have followed your SDK guidelines and am still having problems.
    Any help?

  2. #2
    People Love Me
    Join Date
    Jan 2003
    Maybe you should post some of your code, dear..

    Anyhoo, an unresolved external symbol means that there's a problem with something outside of your main source file that you're compiling... be it mismatched function declarations or wrong data types, or other missing or incorrect things (like function or class definitions after they've been declared).

    At any rate...we can't really help fix your problem if we can't see the code.
    Last edited by Krak; 03-24-2005 at 04:56 PM.

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    I think you're better off getting dev-c++, since it is at least complete when you download it.

    The vc++ beta may be free and the latest thing from M$, but as far as I know it is JUST the compiler. You don't get a lot of creature comforts with that, and you really need to know what you're doing to get all the other bits you need to actually compile code. Ideally of course, it assumes that you already own a VC++ compiler of some sort (with all the aforementioned goodies), and you can simply use the latest compiler in place of the one you have.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  4. #4
    Registered User
    Join Date
    Dec 2004
    VC2005 beta doesn't come with the platform SDK, you need to download it separately, and then add the include directories in the platform SDK to VC2005 in Options.

  5. #5
    Join Date
    Mar 2005
    Heres my code:
    #include <windows.h>
    int APIENTRY WinMain(HINSTANCE hInstance,
                         HINSTANCE hPrevInstance,
                         LPSTR     lpCmdLine,
                         int       nCmdShow)
    	MessageBox(NULL, "\tHello World!", "My first windows app", NULL);
    	return 0;
    Does this help??

  6. #6
    Registered User
    Join Date
    Aug 2004
    San Diego, CA
    You don't have the right library files linked in.

    Download and install the Core SDK, then add the path to its \lib and \include folders to environment variables of the same name for your user/computer.

    This might help.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Linking problems trying to compile QT application
    By Maragato in forum C++ Programming
    Replies: 1
    Last Post: 08-19-2005, 09:08 PM
  2. Compile problems
    By Noxir in forum C++ Programming
    Replies: 5
    Last Post: 08-17-2004, 09:23 AM
  3. Linux To FreeBSD Porting Compile Problems
    By DeepBlackMagic in forum Linux Programming
    Replies: 4
    Last Post: 03-17-2004, 08:17 AM
  4. Replies: 8
    Last Post: 09-22-2003, 01:31 PM
  5. Compile Problems
    By Eber Kain in forum C++ Programming
    Replies: 1
    Last Post: 08-26-2001, 01:50 PM