473,383 Members | 1,815 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

error LNK2001: unresolved external symbol _WinMain@16

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
2 5141
"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: We need more power captain | last post by:
Hi, I know less than a noob, I've been asked to do some compiles in VC++ 6 without knowing too much at all. (I'm a COBOL program normally so this is all too much for me) I open VC++6, open...
2
by: Faith | last post by:
hi guys, As you can understand from the subject the problem is the: error LNK2001: unresolved external symbol _errno Whats so wierd is that when i build the project "A" alone it works with no...
1
by: Alek Davis | last post by:
I am trying to build a DLL in VS.NET 2003 and it works fine in Debug mode. However, if I try to build it in Release mode, I get the following link error in several .obj files: error LNK2001:...
0
by: Simon | last post by:
Hi All, I have come across a problem with a bog std MFC app linking to bog std MFC extension dll - both generated by the wizards. The code is set out below. The trouble is with the static...
0
by: Franky | last post by:
Tried to build in VS2005 a program that builds OK in VS2003 and get errors like the following: Error 57 error LNK2001: unresolved external symbol _WinMainCRTStartup AnnGame Error 58 error...
1
by: Vishu7 | last post by:
Hi, I am porting my code which is written in VC2005( c++) to WinCE 5.0. When i build my project i get this error AACDec.def : error LNK2001: unresolved external symbol DllCanUnloadNow ...
0
by: =?Utf-8?B?TWF0ZXVzeiBSYWpjYQ==?= | last post by:
Hi! How can I fix this error? Error 1 error LNK2001: unresolved external symbol "extern "C" long __stdcall SHFlushClipboard(void)" (?SHFlushClipboard@@$$J10YGJXZ) UnmanagedTest.obj Basically...
6
by: sadegh | last post by:
Hi I have a problem with my program in VC++6 When I compile it, the following errors are listed. I spend a lot of time on the groups.google.com to find its reason, but none of comments could...
5
by: bonnielym84 | last post by:
Im new here..didnt noe whether is this the rite way to post my problem..Really need help here..i've been stucked in this error from last wk..My problem is like this..Im using VC++ 6.0 to compile my C...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.