• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 298
  • Last Modified:

Linker Error - Unicode

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
Kalle 2
Asked:
Kalle 2
1 Solution
 
danny_pavCommented:
How is your WinMain defined?
0
 
Kalle 2Author Commented:
I skeleton code for my project was provided by the AppWizard.
Where do I look to find my WinMain definition?

// Anders
0
 
trestanCommented:
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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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

// Anders
0
 
bogie2Commented:
You must include "UNICODE" support during project setup.
0
 
Kalle 2Author Commented:
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
 
danny_pavCommented:
1. _WinMain@16 looks like a C++ mangled name.  Are you using C++?
2. What does your WinMain declaration look like?
0
 
chensuCommented:
PRB: Error LNK2001: '_WinMain@16': Unresolved External Symbol
http://support.microsoft.com/support/kb/articles/q125/7/50.asp
0
 
Kalle 2Author Commented:
Easy as that, thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now