<small id='UPGTi'></small><noframes id='UPGTi'>

    <tfoot id='UPGTi'></tfoot>
    <legend id='UPGTi'><style id='UPGTi'><dir id='UPGTi'><q id='UPGTi'></q></dir></style></legend>
  1. <i id='UPGTi'><tr id='UPGTi'><dt id='UPGTi'><q id='UPGTi'><span id='UPGTi'><b id='UPGTi'><form id='UPGTi'><ins id='UPGTi'></ins><ul id='UPGTi'></ul><sub id='UPGTi'></sub></form><legend id='UPGTi'></legend><bdo id='UPGTi'><pre id='UPGTi'><center id='UPGTi'></center></pre></bdo></b><th id='UPGTi'></th></span></q></dt></tr></i><div id='UPGTi'><tfoot id='UPGTi'></tfoot><dl id='UPGTi'><fieldset id='UPGTi'></fieldset></dl></div>

        <bdo id='UPGTi'></bdo><ul id='UPGTi'></ul>

      我可以将 Visual Studio 2010 的 C++ 编译器与 Visual Studio 2008 的 C++

      Can I use Visual Studio 2010#39;s C++ compiler with Visual Studio 2008#39;s C++ Runtime Library?(我可以将 Visual Studio 2010 的 C++ 编译器与 Visual Studio 2008 的 C++ 运行时库一起使用吗?)
      <tfoot id='65a8p'></tfoot>

        <i id='65a8p'><tr id='65a8p'><dt id='65a8p'><q id='65a8p'><span id='65a8p'><b id='65a8p'><form id='65a8p'><ins id='65a8p'></ins><ul id='65a8p'></ul><sub id='65a8p'></sub></form><legend id='65a8p'></legend><bdo id='65a8p'><pre id='65a8p'><center id='65a8p'></center></pre></bdo></b><th id='65a8p'></th></span></q></dt></tr></i><div id='65a8p'><tfoot id='65a8p'></tfoot><dl id='65a8p'><fieldset id='65a8p'></fieldset></dl></div>

              <legend id='65a8p'><style id='65a8p'><dir id='65a8p'><q id='65a8p'></q></dir></style></legend>

                <bdo id='65a8p'></bdo><ul id='65a8p'></ul>
                  <tbody id='65a8p'></tbody>
              • <small id='65a8p'></small><noframes id='65a8p'>

                本文介绍了我可以将 Visual Studio 2010 的 C++ 编译器与 Visual Studio 2008 的 C++ 运行时库一起使用吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我有一个应用程序需要在 Windows 2000 上运行.我也想使用 Visual Studio 2010(主要是因为 auto 关键字的定义发生了变化).但是,我有点困惑,因为我需要该应用程序能够在较旧的操作系统上运行,即:

                I have an application that needs to operate on Windows 2000. I'd also like to use Visual Studio 2010 (mainly because of the change in the definition of the auto keyword). However, I'm in a bit of a bind because I need the app to be able to operate on older OS's, namely:

                • Windows 2000
                • Windows XP RTM
                • Windows XP SP1

                Visual Studio 2010 的运行时库依赖于 Windows XP SP2 中引入的 EncodePointer/DecodePointer API.

                Visual Studio 2010's runtime library depends on the EncodePointer / DecodePointer API which was introduced in Windows XP SP2.

                如果可以使用备用运行时库,这个依赖于 VS2010 中添加的 C++0x 特性的代码会不会被破坏,比如 std::regex?

                If using the alternate runtime library is possible, will this break code that relies on C++0x features added in VS2010, like std::regex?

                推荐答案

                Suma 的解决方案 看起来很有希望,但它不起作用:__imp__*@4 符号需要指针指向函数,而不是函数本身.不幸的是,我不知道如何让 Visual C++ 吐出一个带有这种名称生成的指针......(好吧,__declspec(naked) 结合 __stdcall 确实诀窍,但后来我不知道如何发出指针).

                Suma's solution looked pretty promising, but it doesn't work: the __imp__*@4 symbols need to be pointers to functions, rather than the functions themselves. Unfortunately, I don't know how to make Visual C++ spit out a pointer with that kind of name generation... (well, __declspec(naked) combined with __stdcall does the trick, but then I don't know how to emit a pointer).

                如果在构建时使用汇编器没问题,那么解决方案非常简单 - 使用 FASM 并链接到生成的目标文件,并且很快 - exe 中没有 EncodePointer/DecodePointer 引用:

                If using an assembler at build-time is OK, the solution is pretty trivial - assemble the following code with FASM and link against the produced object file, and presto - no EncodePointer/DecodePointer references in the exe:

                use32
                format ms coff
                
                section ".data" data
                public __imp__DecodePointer@4
                __imp__DecodePointer@4 dd dummy
                
                public __imp__EncodePointer@4
                __imp__EncodePointer@4 dd dummy
                
                section ".text" code
                dummy:
                mov eax, [esp+4]
                retn 4
                

                这篇关于我可以将 Visual Studio 2010 的 C++ 编译器与 Visual Studio 2008 的 C++ 运行时库一起使用吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                C++ stl unordered_map implementation, reference validity(C++ stl unordered_map 实现,参考有效性)
                C++: Is it possible to use a reference as the value in a map?(C++:是否可以使用引用作为映射中的值?)
                Where ampersand quot;amp;quot; can be put when passing argument by reference?(其中符号“amp;通过引用传递参数时可以放置吗?)
                Why can a non-const reference parameter be bound to a temporary object?(为什么可以将非常量引用参数绑定到临时对象?)
                What is a dangling reference?(什么是悬空引用?)
                C++ reference changes when push_back new element to std::vector(当 push_back 新元素到 std::vector 时,C++ 引用发生变化)
              • <i id='QcDS0'><tr id='QcDS0'><dt id='QcDS0'><q id='QcDS0'><span id='QcDS0'><b id='QcDS0'><form id='QcDS0'><ins id='QcDS0'></ins><ul id='QcDS0'></ul><sub id='QcDS0'></sub></form><legend id='QcDS0'></legend><bdo id='QcDS0'><pre id='QcDS0'><center id='QcDS0'></center></pre></bdo></b><th id='QcDS0'></th></span></q></dt></tr></i><div id='QcDS0'><tfoot id='QcDS0'></tfoot><dl id='QcDS0'><fieldset id='QcDS0'></fieldset></dl></div>
                        <tbody id='QcDS0'></tbody>
                    1. <legend id='QcDS0'><style id='QcDS0'><dir id='QcDS0'><q id='QcDS0'></q></dir></style></legend>

                      <tfoot id='QcDS0'></tfoot>
                        <bdo id='QcDS0'></bdo><ul id='QcDS0'></ul>

                        <small id='QcDS0'></small><noframes id='QcDS0'>