Solved

Linker Error - Unicode

Posted on 1998-08-13
9
291 Views
Last Modified: 2013-11-20
Hi All!
I am writing a program which is going to compile in both
ANSI and UNICODE. It works out Ok in ANSI but when I
compile under _UNICODE I receive this linker error (below).
Can anyone tell me what I am doing wrong?

Best rgds // Anders Karlsson

--------------------Configuration: ControlPanel - Win32 DebugUniCode--------------------
Linking...
msvcrtd.lib(crtexew.obj) : error LNK2001: unresolved external symbol _WinMain@16

DebugUniCode/ControlPanel.exe : fatal error LNK1120: 1 unresolved externals
0
Comment
Question by:Kalle 2
9 Comments
 
LVL 3

Expert Comment

by:danny_pav
ID: 1320727
How is your WinMain defined?
0
 

Author Comment

by:Kalle 2
ID: 1320728
I skeleton code for my project was provided by the AppWizard.
Where do I look to find my WinMain definition?

// Anders
0
 
LVL 8

Expert Comment

by:trestan
ID: 1320729
I guess you must have specified the entry point as wWinMainCRTStartup, right? If you use AppWizard to creat the framework, delete it and try again. Please contact me if further questions.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Kalle 2
ID: 1320730
No, I have not specified any entry-point at all.
I am building a MFC AppWizard Exe.

// Anders
0
 

Expert Comment

by:bogie2
ID: 1320731
You must include "UNICODE" support during project setup.
0
 

Author Comment

by:Kalle 2
ID: 1320732
No, the code is written so that it compiles under both
_UNICODE and ANSI. There is something missing though (library)
when I compile it under _UNICODE.

// Anders
0
 
LVL 3

Expert Comment

by:danny_pav
ID: 1320733
1. _WinMain@16 looks like a C++ mangled name.  Are you using C++?
2. What does your WinMain declaration look like?
0
 
LVL 23

Accepted Solution

by:
chensu earned 100 total points
ID: 1320734
PRB: Error LNK2001: '_WinMain@16': Unresolved External Symbol
http://support.microsoft.com/support/kb/articles/q125/7/50.asp
0
 

Author Comment

by:Kalle 2
ID: 1320735
Easy as that, thanks!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Folder Comparison 12 55
Separate into files by filename 12 91
format the code in java 6 110
noX challenge 17 134
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question