2
votes

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 ?

1

1 Answers

3
votes

From You receive an "error LNK2001: unresolved external symbol ___argc" error message when the MFC library and the CRT library do not match in debug/release or in static/dynamic in Visual C++".

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."