Error when linking exe

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Randy Hay

    Error when linking exe

    I am using Visual Developer Studio V5.0 on an XP workstation and am getting the following error when ever I try to link ANY type of exe:
    LIBCD.lib(wincr t0.obj) : error LNK2001: unresolved external symbol _WinMain@16
    Debug/test.exe : fatal error LNK1120: 1 unresolved externals
    Error executing link.exe.
    Can anyone help?
  • Sin

    #2
    Re: Error when linking exe

    > I am using Visual Developer Studio V5.0 on an XP workstation and am
    getting the following error when ever I try to link ANY type of exe:[color=blue]
    > LIBCD.lib(wincr t0.obj) : error LNK2001: unresolved external symbol[/color]
    _WinMain@16[color=blue]
    > Debug/test.exe : fatal error LNK1120: 1 unresolved externals
    > Error executing link.exe.
    > Can anyone help?[/color]

    I suppose your main looks like one of these:

    void main(void)
    int main(void)
    int main(int argc, char *argv[])
    void main(int argc, char *argv[])

    ???

    If so then you should know that Windows (ie : non-console) applications need
    to use WinMain (see MSDN for params and return type).

    Alex.


    Comment

    Working...