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. Advertising

  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. Advertising

  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. Advertising

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:
    927
    Mark Goldin
    Jan 17, 2004
  2. Kevin Spencer

    Re: Link Link Link DANGER WILL ROBINSON!!!

    Kevin Spencer, May 17, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    800
    Kevin Spencer
    May 17, 2005
  3. Midex
    Replies:
    24
    Views:
    886
  4. Replies:
    2
    Views:
    382
  5. Christopher M. Lusardi
    Replies:
    3
    Views:
    181
    Alan J. Flavell
    Oct 19, 2003
Loading...

Share This Page