error LNK2001: unresolved external symbol _WinMain@16

G

Guest

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!!!
 
L

Larry Brasfield

jpeters said:
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.
 
G

Guest

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top