Solved

Linker Error - Unicode

Posted on 1998-08-13
9
290 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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

Question has a verified solution.

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

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

856 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