[Webinar] Streamline your web hosting managementRegister Today

x
  • 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
Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

 
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

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

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