天天看點

解決若幹WTL與VS2010的相容問題(如error MSB6006: “cmd.exe”) - Sunwayking

解決若幹WTL與VS2010的相容問題(如error MSB6006: “cmd.exe”)

解決[error MSB6006: “cmd.exe” 已退出,代碼為 9009。]問題:

The AppWizard for VS2010 above has two small glitches (however they might deter people from using WTL with VS2010). These are very easy to fix:

1) [Output Directory] and [Intermediate Directory] in new project properties are not followed by a backslash (\'\\').

To fix: file: .\AppWiz\Files\Scripts\1033\default.js

I have replaced:

            if(bDebug)

        {

            config.IntermediateDirectory = \'Debug\';

            config.OutputDirectory = \'Debug\';

            config.ATLMinimizesCRunTimeLibraryUsage = false;

        }

        else

        {

            config.IntermediateDirectory = \'Release\\\';

            config.OutputDirectory = \'Release\\\';

            config.ATLMinimizesCRunTimeLibraryUsage = true;

        }

with

        // Add generic configuration details

        config.IntermediateDirectory = \'$(SolutionDir)$(Configuration)\\\';

        config.OutputDirectory = \'$(Configuration)\\\';

        config.ATLMinimizesCRunTimeLibraryUsage = !bDebug;

2) Some WTL headers are missing in newly created projects.

The symbol WTL_USE_CPP_FILES seems to be missing when the template stdafx.h file is parsed, as a result a bunch of header files are not included in new projects.

Again in .\AppWiz\Files\Scripts\1033\default.js, I have added:

        // Add WTL_USE_CPP_FILES to all projects

    wizard.AddSymbol("WTL_USE_CPP_FILES", true)

just below line 41 (so that the lines are always included). This seems to do the trick.

I\'ve never looked at VS appWizards before (or js for that matter), so I can\'t guarantee the workarounds are concrete. It seems pretty straighforward though & I\'ve been using WTL with VS2010 with no problems since I\'ve made those changes...

WTL is awesome btw - many thanks to the folks who still maintain it!

解決[ Compiling Ribbon.xml \'uicc\' 不是内部或外部指令,也不是可運作的程式或批處理檔案。]問題:

The Windows SDK v7.0A which comes with Visual Studio 2010 is not the full Windows SDK.

Among other things, it doesn\'t include uicc.exe

You should install the full Windows 7 SDK.

然後:

To compile the Ribbon.xml file you NEED the Windows 7 SDK (as VS2010

distributions miss the necessary uicc.exe tool)

AND you must add the path to your uicc.exe (probably C:\Program

Files\Microsoft SDKs\Windows\v7.0\Bin\) in Property

Manager->Microsoft.Cpp.Win32.user->Properties->VC++ Directories->Executable

Directories.

解決若幹WTL與VS2010的相容問題(如error MSB6006: “cmd.exe”) - Sunwayking