Building my first program. Link errors

Discussion in 'C++' started by John, Sep 9, 2004.

  1. John

    John Guest

    I'm trying to build my first program using Visual C++ V6 and I have a
    build error. It's got to be something to do with main() but I can't see
    what. Can someone give me a clue as to which library I need to satisfy this.

    Linking...
    LIBCMT.lib(wincrt0.obj) : error LNK2001: unresolved external symbol
    _WinMain@16
    Debug/myprog.exe : fatal error LNK1120: 1 unresolved externals
    Error executing link.exe.
     
    John, Sep 9, 2004
    #1
    1. Advertisements

  2. John wrote:
    > I'm trying to build my first program using Visual C++ V6 and I have a
    > build error. It's got to be something to do with main() but I can't see
    > what. Can someone give me a clue as to which library I need to satisfy
    > this.
    >
    > Linking...
    > LIBCMT.lib(wincrt0.obj) : error LNK2001: unresolved external symbol
    > _WinMain@16
    > Debug/myprog.exe : fatal error LNK1120: 1 unresolved externals
    > Error executing link.exe.


    <offtopic>
    Make sure that your project's target is a "Console Application" and not
    a "Windows Application".
    </offtopic>

    Ask in 'microsoft.public.vc.*' newsgroups for more advice on how to set
    everything up.

    Victor
     
    Victor Bazarov, Sep 9, 2004
    #2
    1. Advertisements

  3. John

    John Guest

    Victor Bazarov wrote:
    > John wrote:
    >
    >> I'm trying to build my first program using Visual C++ V6 and I have a
    >> build error. It's got to be something to do with main() but I can't
    >> see what. Can someone give me a clue as to which library I need to
    >> satisfy this.
    >>
    >> Linking...
    >> LIBCMT.lib(wincrt0.obj) : error LNK2001: unresolved external symbol
    >> _WinMain@16
    >> Debug/myprog.exe : fatal error LNK1120: 1 unresolved externals
    >> Error executing link.exe.

    >
    >
    > <offtopic>
    > Make sure that your project's target is a "Console Application" and not
    > a "Windows Application".
    > </offtopic>
    >
    > Ask in 'microsoft.public.vc.*' newsgroups for more advice on how to set
    > everything up.
    >
    > Victor


    Thank you. That has done the trick. I still have a lot to learn :)
     
    John, Sep 10, 2004
    #3
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mark Goldin

    Errors, errors, errors

    Mark Goldin, Jan 17, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    1,259
    Mark Goldin
    Jan 17, 2004
  2. =?Utf-8?B?c3Fsc3Rlcg==?=

    First time building project

    =?Utf-8?B?c3Fsc3Rlcg==?=, Feb 1, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    447
    =?Utf-8?B?SGFyaXNoIFNoaWtoYXJl?=
    Feb 2, 2006
  3. Anthony Clayton

    building my first site from scratch

    Anthony Clayton, Aug 27, 2005, in forum: HTML
    Replies:
    11
    Views:
    764
  4. Midex
    Replies:
    24
    Views:
    1,243
  5. Replies:
    2
    Views:
    495
  6. yogi_bear_79

    Help building first class

    yogi_bear_79, Mar 24, 2008, in forum: C++
    Replies:
    5
    Views:
    355
    Ross A. Finlayson
    Mar 25, 2008
  7. yogi_bear_79

    Help building first class

    yogi_bear_79, Mar 25, 2008, in forum: C++
    Replies:
    11
    Views:
    679
    red floyd
    Mar 25, 2008
  8. Christopher M. Lusardi
    Replies:
    3
    Views:
    367
    Alan J. Flavell
    Oct 19, 2003
Loading...