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.

 

 

posted on 2011-09-14 17:20  Sunwayking  阅读(3263)  评论(1编辑  收藏  举报