Reputation: 81
I receive the reported error when compiling my dll under VS2010.
uafxcw.lib(appcore.obj) : error LNK2001: unresolved external symbol ___wargv uafxcw.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argc
Settings seems to be corrected; that is :
Use of MFC set to : Use of MFC in a Static Library
Runtime Library set to : Multi-threaded
The dll is a directshow filter (Entry point : DllEntryPoint@12). All linked static library are compiled with the same settings, but I can't remove this error. Preprocessor settings are : WIN32;NDEBUG;_WINDOWS;UNICODE
Someone have any idea ?
Upvotes: 2
Views: 2718
Reputation: 1815
When the MFC and CRT (C Run-Time) libraries do not match in debug/release or in static/dynamic, you will get this error.
Resolution:
To change the type of C Run-Time library used by an application or DLL, go to the Build/Project settings property sheet and switch to the C/C++ tab. On the C/C++ page, choose the "Code Generation" category. Change the value of the "Use run-time library" listbox. Pay careful attention to make this specific for each configuration; only one configuration, such as "Win32 (80x86) Debug," should be selected when you change this value. Debug, shared library MFC applications - "Debug Multithreaded Dll."
Release, shared library MFC applications - "Multithread Dll."
Debug, static library MFC applications - "Debug Multithreaded."
Release, static library MFC applications - "Multithreaded."
Upvotes: 3