By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,696 Members | 2,213 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,696 IT Pros & Developers. It's quick & easy.

error LNK2001: unresolved external symbol _WinMain@16

P: n/a
Just installed Service Pack 5 for Visual C++ 6.0. Now I'm getting an error
when linking as follows:
inking...
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/HW8.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

what happened? I wasn't having any linking errors before this patch. help!!!
Nov 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"jpeters" <jp*****@discussions.microsoft.com> wrote in message
news:46**********************************@microsof t.com...
Just installed Service Pack 5 for Visual C++ 6.0. Now I'm getting an error
when linking as follows:
inking...
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/HW8.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

what happened? I wasn't having any linking errors before this patch. help!!!


I assume that your application at some time
did compile and link correctly.

The error is not due to the service pack.
You likely have changed the project type or
link settings. That symbol refers to the entry
point of a Win32 application as opposed to a
Win32 Console application. Just review and
fix your project settings, and do a rebuild all.
Pay special attention to the /subsystem: option
in the linker settings.

If that does not cure the trouble, you have a
little more work to do.

Is your app a console application? If so, that
symbol should not be referenced with the right
/subsystem: option. If your app is a windowed
application, you either forgot to define WinMain(),
dropped it from the project, or somehow messed
up the WinMain() declaration so that it appears in
the .obj under a different name. You can use
dumpbin.exe to see what name it got. Compare
that to the symbol mentioned by the linker.

--
--Larry Brasfield
email: do***********************@hotmail.com
Above views may belong only to me.
Nov 17 '05 #2

P: n/a
Larry - you saved my life...I had the razor blades out...but seriously, I did
not have the project defined as a as a Console application...whew...
thank you

"Larry Brasfield" wrote:
"jpeters" <jp*****@discussions.microsoft.com> wrote in message
news:46**********************************@microsof t.com...
Just installed Service Pack 5 for Visual C++ 6.0. Now I'm getting an error
when linking as follows:
inking...
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/HW8.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

what happened? I wasn't having any linking errors before this patch. help!!!


I assume that your application at some time
did compile and link correctly.

The error is not due to the service pack.
You likely have changed the project type or
link settings. That symbol refers to the entry
point of a Win32 application as opposed to a
Win32 Console application. Just review and
fix your project settings, and do a rebuild all.
Pay special attention to the /subsystem: option
in the linker settings.

If that does not cure the trouble, you have a
little more work to do.

Is your app a console application? If so, that
symbol should not be referenced with the right
/subsystem: option. If your app is a windowed
application, you either forgot to define WinMain(),
dropped it from the project, or somehow messed
up the WinMain() declaration so that it appears in
the .obj under a different name. You can use
dumpbin.exe to see what name it got. Compare
that to the symbol mentioned by the linker.

--
--Larry Brasfield
email: do***********************@hotmail.com
Above views may belong only to me.

Nov 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.