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

    2. <legend id='n6s9U'><style id='n6s9U'><dir id='n6s9U'><q id='n6s9U'></q></dir></style></legend><tfoot id='n6s9U'></tfoot>

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

      添加 #include <boost/thread/mutex.hpp>破坏了我的 ActiveX 控件?

      Adding #include lt;boost/thread/mutex.hppgt; breaks my ActiveX control?(添加 #include boost/thread/mutex.hpp破坏了我的 ActiveX 控件?)
      <tfoot id='eLTtH'></tfoot>
        <bdo id='eLTtH'></bdo><ul id='eLTtH'></ul>
        • <i id='eLTtH'><tr id='eLTtH'><dt id='eLTtH'><q id='eLTtH'><span id='eLTtH'><b id='eLTtH'><form id='eLTtH'><ins id='eLTtH'></ins><ul id='eLTtH'></ul><sub id='eLTtH'></sub></form><legend id='eLTtH'></legend><bdo id='eLTtH'><pre id='eLTtH'><center id='eLTtH'></center></pre></bdo></b><th id='eLTtH'></th></span></q></dt></tr></i><div id='eLTtH'><tfoot id='eLTtH'></tfoot><dl id='eLTtH'><fieldset id='eLTtH'></fieldset></dl></div>

        • <legend id='eLTtH'><style id='eLTtH'><dir id='eLTtH'><q id='eLTtH'></q></dir></style></legend>

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

            <tbody id='eLTtH'></tbody>

              • 本文介绍了添加 #include <boost/thread/mutex.hpp>破坏了我的 ActiveX 控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                在 ActiveX 控件中使用时 boost::mutex 标头是否存在已知问题?
                (Boost 版本 v1.39)

                如果我在 Visual Studio 2008 中创建一个名为 "DefaultOCXControl"MFC ActiveX Control 项目,那么我可以构建它,该控件将自身注册为构建的一部分,并且可以按照您的预期插入到 ActiveX 测试容器中.一切都很好.

                If I create an MFC ActiveX Control project in Visual Studio 2008 called "DefaultOCXControl" then I can build it, the control registers itself as part of the build, and can be inserted into the ActiveX Test Container as you would expect. All good.

                如果我再添加这一行:

                #include <boost/thread/mutex.hpp>
                

                在我的 DefaultOCXControlCtrl.h 文件的顶部并重新构建:构建结束时的注册步骤失败:

                at the top of my DefaultOCXControlCtrl.h file and rebuild: the registration step at the end of the build fails with:

                调试断言失败!
                程序:C:Windowssystem32 egsvr32.exe
                文件:f:ddvctoolsvc7libsshipatlmfcsrcmfcdllinit.cpp
                行:587

                Debug Assertion Failed!
                Program: C:Windowssystem32 egsvr32.exe
                File: f:ddvctoolsvc7libsshipatlmfcsrcmfcdllinit.cpp
                Line: 587

                违规断言如下所示:

                void AFXAPI AfxCoreInitModule()
                {
                    ASSERT(AfxGetModuleState() != AfxGetAppModuleState());
                    ...
                

                现在尝试将控件插入 ActiveX 测试容器会产生相同的消息.如果我删除该行并重新构建,那么一切都很好 - 所以它肯定是该头文件中的某些内容导致了问题.

                Attempting to insert the control into the ActiveX Test Container now results in the same message. If I remove the line and rebuild then everything is fine - so it definitely seems to be something in that header file that causes the issue.

                推荐答案

                您是否尝试过动态链接 boost::thread(定义 BOOST_THREAD_DYN_LINK)?

                Have you tried linking boost::thread dynamically (define BOOST_THREAD_DYN_LINK)?

                我在将 boost::thread 与混合 C++/.NET 项目一起使用时遇到了这种问题,并且只动态链接 boost::thread 是解决方案(这里一个可能的解释:http://article.gmane.org/gmane.comp.lib.boost.user/22617/match=clr)

                I had this kind of problems when using boost::thread with a mixed C++/.NET project and linking just boost::thread dynamically was the solution (here a possible explanation: http://article.gmane.org/gmane.comp.lib.boost.user/22617/match=clr)

                这篇关于添加 #include <boost/thread/mutex.hpp>破坏了我的 ActiveX 控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                相关文档推荐

                How to print vector#39;s data(如何打印矢量的数据)
                Visual C++ appends 0xCC (int3) bytes at the end of functions(Visual C++ 在函数末尾附加 0xCC (int3) 字节)
                How to use a variable inside a _T wrapper?(如何在 _T 包装器中使用变量?)
                MSVC++ warning flags(MSVC++ 警告标志)
                How to read file which contains uxxxx in vc++(如何在vc++中读取包含uxxxx的文件)
                stack overflow error in C++ program(C++程序中的堆栈溢出错误)

                • <bdo id='F1wt4'></bdo><ul id='F1wt4'></ul>
                  <legend id='F1wt4'><style id='F1wt4'><dir id='F1wt4'><q id='F1wt4'></q></dir></style></legend>

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

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

                        <tfoot id='F1wt4'></tfoot>
                          <tbody id='F1wt4'></tbody>