Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Mar 2004
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    c++ compiling errors... very odd!

    Hi, my VC++ 6 is acting wierd. After i try running a few small programs, it gives me this error:

    --------------------Configuration: a - Win32 Debug--------------------
    Linking...
    LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
    Debug/a.exe : fatal error LNK1120: 1 unresolved externals
    Error executing link.exe.

    a.exe - 2 error(s), 0 warning(s)

    EVEN IF MY PROGRAM IS THIS!

    #include <iostream.h>

    int main()
    {
    cout << "Hey";

    return 0;
    }

  • #2
    Regular Coder
    Join Date
    Dec 2003
    Posts
    367
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Looks like you're trying to compile and run your program as a Windows app instead of as a console app (So it searches for a WinMain as it's entry point instead of main). When you create a new project, choose the "Win32 Console Application" and not "Win32 Application".

    shmoove


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •