VC++ 2005 Beta Compile problems

This is a discussion on VC++ 2005 Beta Compile problems within the C++ Programming forums, part of the General Programming Boards category; I am quite new to C++ and have a problem linking the sample "Hello World" windows program. It comes up ...

  1. #1
    SkillMatt
    Join Date
    Mar 2005
    Posts
    2

    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
    Posts
    412
    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
    Location
    The edge of the known universe
    Posts
    32,855
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  4. #4
    Registered User
    Join Date
    Dec 2004
    Posts
    95
    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
    SkillMatt
    Join Date
    Mar 2005
    Posts
    2
    Heres my code:
    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
    Location
    San Diego, CA
    Posts
    313
    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, 10:08 PM
  2. Compile problems
    By Noxir in forum C++ Programming
    Replies: 5
    Last Post: 08-17-2004, 10: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, 02:31 PM
  5. Compile Problems
    By Eber Kain in forum C++ Programming
    Replies: 1
    Last Post: 08-26-2001, 02:50 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21