Visual Studio setting to deal with missing MSVCP140D.dll - visual-studio

My build computer is different than my target (although both are Windows 10).
I am using VS2017 with the latest updates.
The target machine has MFC: 14.12.25810
How do I set my project settings so that I can target that version of MFC. I keep getting an error of: missing MSVCP140D.dll
And when I try to install the VS2015 C++ redistributable, I get an error about conflicting versions. So I would rather stop targeting VS2015, and change to VS2017, or better include the redistributable in the folder I am installing.
Here are my VS2017 Project settings: (I am also using the latest Windows SDK).
UPDATE
I set Static Linked MFC, which added the switch /MTd to the command line:
/permissive- /Yu"stdafx.h" /GS /W3 /Zc:wchar_t /ZI /Gm- /Od /sdl /Fd"x64\Debug\vc141.pdb" /Zc:inline /fp:precise /D "_DEBUG" /D "_CONSOLE" /D "_UNICODE" /D "UNICODE" /errorReport:prompt /WX- /Zc:forScope /RTC1 /Gd /MTd /FC /Fa"x64\Debug\" /EHsc /nologo /Fo"x64\Debug\" /Fp"x64\Debug\LinkWareMessageBus.pch" /diagnostics:classic
However, now I get a bunch of errors on compile:
Severity Code Description Project File Line Suppression State
Warning LNK4098 defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library LinkWareMessageBus D:\Source\LinkWareMessageBus\LINK 1
Severity Code Description Project File Line Suppression State
Error LNK1120 6 unresolved externals LinkWareMessageBus D:\Source\LinkWareMessageBus\x64\Debug\LinkWareMessageBus.exe 1
Error LNK2019 unresolved external symbol __imp_calloc referenced in function nni_alloc LinkWareMessageBus D:\Source\LinkWareMessageBus\nng.lib(win_thread.c.obj) 1
Error LNK2019 unresolved external symbol __imp_rand_s referenced in function nni_plat_seed_prng LinkWareMessageBus D:\Source\LinkWareMessageBus\nng.lib(win_rand.c.obj) 1
Error LNK2019 unresolved external symbol __imp_strerror referenced in function nni_plat_strerror LinkWareMessageBus D:\Source\LinkWareMessageBus\nng.lib(win_debug.c.obj) 1
Error LNK2001 unresolved external symbol __imp_strncpy LinkWareMessageBus D:\Source\LinkWareMessageBus\nng.lib(http_server.c.obj) 1
Error LNK2019 unresolved external symbol __imp_strncpy referenced in function http_set_header LinkWareMessageBus D:\Source\LinkWareMessageBus\nng.lib(http_msg.c.obj) 1
Error LNK2019 unresolved external symbol __imp__beginthreadex referenced in function nni_plat_thr_init LinkWareMessageBus D:\Source\LinkWareMessageBus\nng.lib(win_thread.c.obj) 1
Error LNK2019 unresolved external symbol __imp__stricmp referenced in function nni_strcasecmp LinkWareMessageBus D:\Source\LinkWareMessageBus\nng.lib(strs.c.obj)
I also tried setting "Ignore All Default Libraries = No" but I still get the same error.
Here is the LINK command parameters:
/OUT:"D:\Source\LinkWareMessageBus\x64\Debug\LinkWareMessageBus.exe" /MANIFEST /NXCOMPAT /PDB:"D:\Source\LinkWareMessageBus\x64\Debug\LinkWareMessageBus.pdb" /DYNAMICBASE "flatbuffers.lib" "nng.lib" "mswsock.lib" "advapi32.lib" "ws2_32.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" /IMPLIB:"nng.lib" /DEBUG /MACHINE:X64 /INCREMENTAL /PGD:"D:\Source\LinkWareMessageBus\x64\Debug\LinkWareMessageBus.pgd" /SUBSYSTEM:CONSOLE /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ManifestFile:"x64\Debug\LinkWareMessageBus.exe.intermediate.manifest" /ERRORREPORT:PROMPT /NOLOGO /LIBPATH:"D:\Source\LinkWareMessageBus\nng\lib" /LIBPATH:"D:\Source\LinkWareMessageBus\flatbuffers\lib" /TLBID:1

What I am doing now is just doing release builds with symbols.
https://msdn.microsoft.com/en-us/library/fsk896zz.aspx?f=255&MSPPError=-2147217396
This is especially useful now, since I am writing plugins for other software that does not like to load debug versions of the DLLs I create. Sometimes you can't see the local stack varibles for a function, but you can always see member and instance variables, as well parameters, so this works best for me, and then one does not have to worry about SDK binding issues like above.

Related

Error: Installation of opencv (CUDA support) in windows :cmake compile error windows10 VS2015 cl.exe --broken LNK1104 cannot open program.obj

I’ve been trying to install OPENCV 2.4.13.6 into a GPU-equipped Windows10 machine (CUDA9.0, VS2015, cmake3.10.0 have already been installed).
Though trying to install the opencv 2.4 by referring to https://jamesbowley.co.uk/build-compile-opencv-3-4-in-windows-with-cuda-9-0-and-intel-mkl-tbb/, I got following error.
Error message:
The CXX compiler identification is MSVC 19.0.24215.1
The C compiler identification is MSVC 19.0.24215.1
Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- broken
CMake Error at share/cmake-3.10/Modules/CMakeTestCXXCompiler.cmake:45 (message):
The C++ compiler
"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/opencv/opencv-2.4.13.6/built/CMakeFiles/CMakeTmp
Run Build Command:"C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe" "cmTC_678c6.vcxproj" "/p:Configuration=Debug" "/p:VisualStudioVersion=14.0"
Microsoft (R) Build Engine version 14.0.25420.1
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 2018/10/28 21:46:10.
Project "C:\opencv\opencv-2.4.13.6\built\CMakeFiles\CMakeTmp\cmTC_678c6.vcxproj" on node 1 (default targets).
PrepareForBuild:
Creating directory "cmTC_678c6.dir\Debug\".
Creating directory "C:\opencv\opencv-2.4.13.6\built\CMakeFiles\CMakeTmp\Debug\".
Creating directory "cmTC_678c6.dir\Debug\cmTC_678c6.tlog\".
InitializeBuildStatus:
Creating "cmTC_678c6.dir\Debug\cmTC_678c6.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64\CL.exe /c /Zi /W3 /WX- /Od /Ob0 /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"cmTC_678c6.dir\Debug\\" /Fd"cmTC_678c6.dir\Debug\vc140.pdb" /Gd /TP /errorReport:queue "C:\opencv\opencv-2.4.13.6\built\CMakeFiles\CMakeTmp\testCXXCompiler.cxx"
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24215.1 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
cl /c /Zi /W3 /WX- /Od /Ob0 /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"cmTC_678c6.dir\Debug\\" /Fd"cmTC_678c6.dir\Debug\vc140.pdb" /Gd /TP /errorReport:queue "C:\opencv\opencv-2.4.13.6\built\CMakeFiles\CMakeTmp\testCXXCompiler.cxx"
testCXXCompiler.cxx
Link:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64\link.exe /ERRORREPORT:QUEUE /OUT:"C:\opencv\opencv-2.4.13.6\built\CMakeFiles\CMakeTmp\Debug\cmTC_678c6.exe" /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"C:/opencv/opencv-2.4.13.6/built/CMakeFiles/CMakeTmp/Debug/cmTC_678c6.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:/opencv/opencv-2.4.13.6/built/CMakeFiles/CMakeTmp/Debug/cmTC_678c6.lib" /MACHINE:X64 /machine:x64 C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\lib cmTC_678c6.dir\Debug\testCXXCompiler.obj
LINK : fatal error LNK1104: cannot open file 'C:\Program.obj' [C:\opencv\opencv-2.4.13.6\built\CMakeFiles\CMakeTmp\cmTC_678c6.vcxproj]
Done Building Project "C:\opencv\opencv-2.4.13.6\built\CMakeFiles\CMakeTmp\cmTC_678c6.vcxproj" (default targets) -- FAILED.
Build FAILED.
"C:\opencv\opencv-2.4.13.6\built\CMakeFiles\CMakeTmp\cmTC_678c6.vcxproj" (default target) (1) ->
(Link target) ->
LINK : fatal error LNK1104: cannot open file 'C:\Program.obj' [C:\opencv\opencv-2.4.13.6\built\CMakeFiles\CMakeTmp\cmTC_678c6.vcxproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.42
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:64 (project)
Configuring incomplete, errors occurred!
See also "C:/opencv/opencv-2.4.13.6/built/CMakeFiles/CMakeOutput.log".
See also "C:/opencv/opencv-2.4.13.6/built/CMakeFiles/CMakeError.log".
Though I've been trying to fix this error referring to below URLs for a week, those solution on the URLs did not work with me.
CMake configuring fails. "cl.exe is not able to compile a simple test program"
Why does fatal error "LNK1104: cannot open file 'C:\Program.obj'" occur when I compile a C++ project in Visual Studio?
I would sincerely appreciate for your kind instruction to solve this issue.

vs15 profiling shows only app name

I'm new in visual studio, and use before only codeblocks with gcc-mingw.
The problem is: when i try to profile my application, i want to see list of functions but i get application name instead :
screenshot
how fix it ?
linker command line :
/OUT:"{projects}\bin_vs14\Debug\NovaEngine.exe" /MANIFEST /PROFILE /NXCOMPAT /PDB:"{projects}\bin_vs14\Debug\NovaEngine.pdb" /DYNAMICBASE {manylibs} /MACHINE:X86 /INCREMENTAL:NO /PGD:"{projects}\bin_vs14\Debug\NovaEngine.pgd" /SUBSYSTEM:CONSOLE /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ManifestFile:"{projects}\bin_vs14\obj\Debug\NovaEngine.exe.intermediate.manifest" /ERRORREPORT:PROMPT /NOLOGO /TLBID:1
Module names are shown instead of function names if symbols cannot be resolved e.g. due to missing or out-of-date pdbs. Please ensure that you have up-to-date pdbs e.g. by running your app under debugger.
Also from your screenshot I suppose you have VS 2015 RTM, but not Update 1. Please try to upgrade to VS 2015 Update 1. It has a number of fixes in profiler related to symbol resolution.

Error in premake generated linker command for (at least) visual studio 2010 express

There seems to be an error when generating VS2010 projects from premake, even with the "Hello World" example (Also tried with clink (here) and premake itself)
hello.c
#include <stdio.h>
int main(void) {
puts("Hello, word!");
return 0;
}
premake4.lua
-- premake4.lua
solution "HelloWorld"
configurations "Any"
project "HelloWorld"
kind "ConsoleApp"
language "C"
files "*.c"
defines { "DEBUG" }
flags { "Symbols" }
This simple example fails to link with the message "LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt"
The logfile says:
Build started 09-02-2015 16:06:34.
1>Project "E:\D\Source\premake-dev\pm-test\HelloWorld.vcxproj" on node 2 (build target(s)).
1>InitializeBuildStatus:
Creating "obj\Any\HelloWorld.unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\CL.exe /c /ZI /nologo /W3 /WX- /Od /Oy- /D DEBUG /D _MBCS /Gm /EHsc /RTC1 /MDd /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Fo"obj\Any\\" /Fd".\HelloWorld.pdb" /Gd /TC /analyze- /errorReport:prompt hello.c
hello.c
ManifestResourceCompile:
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\rc.exe /nologo /fo"obj\Any\HelloWorld.exe.embed.manifest.res" obj\Any\HelloWorld_manifest.rc
Link:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\link.exe /ERRORREPORT:PROMPT /OUT:".\HelloWorld.exe" /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /ManifestFile:"obj\Any\HelloWorld.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"E:\D\Source\premake-dev\pm-test\HelloWorld.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /ENTRY:"mainCRTStartup" /DYNAMICBASE /NXCOMPAT /IMPLIB:".\HelloWorld.lib" /MACHINE:X86 obj\Any\HelloWorld.exe.embed.manifest.res
obj\Any\hello.obj
1>LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
1>Done Building Project "E:\D\Source\premake-dev\pm-test\HelloWorld.vcxproj" (build target(s)) -- FAILED.
Build FAILED.
Time Elapsed 00:00:00.33
SOLVED!!
It was an error in my pristine VS2010 install!! See
https://social.msdn.microsoft.com/Forums/vstudio/en-US/d10adba0-e082-494a-bb16-2bfc039faa80/vs2012-rc-installation-breaks-vs2010-c-projects?forum=vssetup
Although i never installed anything but VS2010 ..
SOLUTION: From this page:
http://blogs.msdn.com/b/heaths/archive/2011/04/01/visual-c-2010-sp1-compiler-update-for-the-windows-sdk-7-1.aspx
Copy c:\windows\Microsoft.Net\Framework\v4.0.30319\ cvtres.exe (42Kb)
into Programs(x86)\Microsoft Visual Studio 10.0\VC\Bin\

LNK2001 error when compiling on command line, but not in IDE

I have a large VC++ project developed in Visual Studio 2010 that I need to be able to build from the command line using CL.exe. In the IDE, the project builds successfully, but I haven't been able to build it on the command line.
I've mostly dealt with linker errors and have gotten it down to one:
LINK : error LNK2001: unresolved external symbol _WinMainCRTStartup
C:\<path_to>\Debug\LargeProject.exe : fatal error LNK1120: 1 unresolved externals
I found in the debug folder a file called "LargeProject.log" that shows the precise command line arguments that get called from the IDE when the IDE builds. I've listed them here, if it helps.
(See edit notes at bottom of this question for some updates)
CL.exe /c /Zi /nologo /W3 /WX- /Od /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D _MBCS /D _AFXDLL /Gm- /EHa /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Yc"StdAfx.h" /Fp"Debug\LargeProject.pch" /Fo"Debug\\" /Fd"Debug\vc100.pdb" /Gd /TP /analyze- /errorReport:prompt "Source Files\stdafx.cpp" /wd4482 > testDump.txt
CL.exe /c /Zi /nologo /W3 /WX- /Od /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D _MBCS /D _AFXDLL /Gm- /EHa /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Yu"StdAfx.h" /Fp"Debug\LargeProject.pch" /Fo"Debug\\" /Fd"Debug\vc100.pdb" /Gd /TP /analyze- /errorReport:prompt <list of all source files except the following> /wd4482 > testDump.txt
CL.exe /c /Zi /nologo /W3 /WX- /Od /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D _MBCS /D _AFXDLL /Gm- /EHa /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Yu"StdAfx.h" /Fp"Debug\LargeProject.pch" /Fo"Debug\\" /Fd"Debug\vc100.pdb" /Gd /TP /analyze- /errorReport:prompt "Source Files\LargeProject.cpp" /wd4482 > testDump.txt
rc.exe /D _DEBUG /D _AFXDLL /l"0x0409" /I"Debug\\" /nologo /fo"Debug\LargeProject.res" LargeProject.rc > testDump.txt
rc.exe /nologo /fo"Debug\LargeProject.exe.embed.manifest.res" "Debug\LargeProject_manifest.rc" > testDump.txt
link.exe /ERRORREPORT:PROMPT /OUT:"C:\<path_to>\Debug\LargeProject.exe" /INCREMENTAL /NOLOGO <list of libraries used> /MANIFEST /ManifestFile:"Debug\LargeProject.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"C:\<path_to>\Debug\LargeProject.pdb" /SUBSYSTEM:WINDOWS /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:\<path_to>\Debug\LargeProject.lib" /MACHINE:X86 "Debug\LargeProject.res" > testDump.txt
// note that I don't run any of the commands below because the above command
// threw an error.
mt.exe /nologo /verbose /out:"Debug\LargeProject.exe.embed.manifest" /manifest "Debug\LargeProject.exe.intermediate.manifest" "c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Include\Manifest\dpiaware.manifest" > testDump.txt
rc.exe /nologo /fo"Debug\LargeProject.exe.embed.manifest.res" "Debug\LargeProject_manifest.rc" > testDump.txt
link.exe /ERRORREPORT:PROMPT /OUT:"C:\<path_to>\Debug\LargeProject.exe" /INCREMENTAL /NOLOGO <list of libraries used> /MANIFEST /ManifestFile:"Debug\LargeProject.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"C:\<path to>\Debug\LargeProject.pdb" /SUBSYSTEM:WINDOWS /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:\<path_to>\Debug\LargeProject.lib" /MACHINE:X86 "Debug\LargeProject.res" > testDump.txt
As you can see, I ran each of these in sequence (until I got an error) and dumped the contents to testDump.txt. Here's testDump.txt's contents after the first link.exe command
LINK : error LNK2001: unresolved external symbol _WinMainCRTStartup
C:\<path_to>\Debug\LargeProject.exe : fatal error LNK1120: 1 unresolved externals
I'm confused that I'm getting this error on the command line, but not from the IDE, which is presumably just running these commands behind the scenes. It's also worth noting that I've run the vcvars32.bat file from my command prompt window, so it can't be a local environment variable issue.
Edit:
I've tried adding msvcrt.lib to the list of libraries in the link command. This produced a new linker error:
msvcrt.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain#16 referenced in function ___tmainCRTStartup
C:\<path_to>\Debug\LargeProject.exe : fatal error LNK1120: 1 unresolved externals
I've read that this means the proper entry point wasn't defined in the project. ie, that there should be a WinMain() function in the project to serve as the the entry point for the application. That seems logical, but I haven't found that function and, to reiterate, the project compiles and links fine in the IDE, and presumably the log file I got these commands from is merely listing what the IDE was doing anyway.
There seem to be other CRT libraries. I tried msvcprt.lib, but that yeilded an identical error message to before I had added anything. The other similar .lib files that exist are msvcmrt.lib,msvcmrtd,msvcprtd,msvcrtd,msvcurt,and msvcurtd. What are the differences between these library files, and how does someone choose which one to use?
I had the same error and I know how to fix it.
In your project, you choose a non GUI project : it is a mistake and to fix it choose (I dont known the exact names, I use VS in French)
option->Link options->System->Sub-système=Windows
and it should work

wxWidgets (static lib) will not link under VC++ 2010

I cannot get a wxWidgets program that uses the wxWidgets static libraries to compile and link properly under VC++ 2010. Under VC++ 2008, it's fine. (WxWidgets still ships with vc++ 2008 project files.)
I compiled and ran the "minimal" sample program that comes with wxWidgets. It is a GUI hello world. No problem. I used VC++ 2010 to convert the .vsproj to .vsxproj and attempt to compile and link under VC++ 2010. Problem.
Be assured that I changed absolutely nothing other than to run the VC++ 2010 conversion to create minimal.vsxproj.
I got many linker warnings and errors, all having to do with STL wchar_t strings in the wxWidgets libs. Here is what I think is happening. I believe there must be #ifdefs in the wxWidgets code that select __declspec(import) or not, based on preprocessor symbols. When VC++ 2010 converted the project, it must have changed the symbols to something that fools wxWidgets. If so, the bug could be in either place, either wxWidgets is making invalid assumptions about pre-processor definitions, or the VC++ 2010 conversion messed them up.
The command lines for compiling the lone .cpp file in the project differ more than I would expect them to.
2008 command line
/Od /I ".....\lib\vc_lib\mswud" /I ".....\include" /I "." /I
".....\samples" /D "WIN32" /D "_DEBUG" /D
"_CRT_SECURE_NO_DEPRECATE=1" /D "_CRT_NON_CONFORMING_SWPRINTFS=1" /D
"_SCL_SECURE_NO_WARNINGS=1" /D "WXMSW" /D "_UNICODE" /D "_WINDOWS"
/D "NOPCH" /D "UNICODE" /FD /EHsc /RTC1 /MDd /Fo"vc_mswud\minimal\"
/Fd"vc_mswud\minimal.pdb" /W4 /nologo /c /Zi /TP /errorReport:prompt
/MP
2010 command line
/I".....\lib\vc_lib\mswud" /I".....\include" /I"."
/I".....\samples" /Zi /nologo /W4 /WX- /Od /Oy- /D "WIN32" /D
"_DEBUG" /D "_CRT_SECURE_NO_DEPRECATE=1" /D
"_CRT_NON_CONFORMING_SWPRINTFS=1" /D "_SCL_SECURE_NO_WARNINGS=1" /D
"WXMSW" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /Gm- /EHsc /RTC1
/MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /GR
/Fp"vc_mswud\minimal\minimal.pch" /Fa"vc_mswud\minimal\"
/Fo"vc_mswud\minimal\" /Fd"vc_mswud\minimal.pdb" /Gd /analyze-
/errorReport:queue
Example 2010 warning and error
1>wxbase29ud.lib(ipcbase.obj) : warning LNK4049: locally defined symbol ??1?$basic_string#_WU?$char_traits#_W#std##V?$allocator#_W#2##std##QAE#XZ (public: __thiscall std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >::~basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >(void)) imported
1>wxbase29ud.lib(mimecmn.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > & __thiscall std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >::assign(class std::_String_const_iterator<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >,class std::_String_const_iterator<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >)" (__imp_?assign#?$basic_string#_WU?$char_traits#_W#std##V?$allocator#_W#2##std##QAEAAV12#V?$_String_const_iterator#_WU?$char_traits#_W#std##V?$allocator#_W#2##2#0#Z)
You absolutely must build wxWidgets and the application using it with the same version of the compiler, different MSVC versions use different, incompatible versions of the CRT and so there is no chance at all that you can use VC10 to build an application and link it with wxWidgets built with VC9.
As for building wx itself with VC10, there are indeed sometimes some problems when importing VC9 projects, the custom build rules can somehow be mangled. If this happens to you (although AFAIK nobody reported it for wx 2.9.4 project files yet), just copy the custom build rules for setup.h manually or simply execute them yourself manually.
FWIW we hope to have "native" VC10 and VC11 projects in 3.0 release (coming soon).

Resources