久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <tfoot id='7gLFG'></tfoot>
    1. <small id='7gLFG'></small><noframes id='7gLFG'>

      <legend id='7gLFG'><style id='7gLFG'><dir id='7gLFG'><q id='7gLFG'></q></dir></style></legend>

        <i id='7gLFG'><tr id='7gLFG'><dt id='7gLFG'><q id='7gLFG'><span id='7gLFG'><b id='7gLFG'><form id='7gLFG'><ins id='7gLFG'></ins><ul id='7gLFG'></ul><sub id='7gLFG'></sub></form><legend id='7gLFG'></legend><bdo id='7gLFG'><pre id='7gLFG'><center id='7gLFG'></center></pre></bdo></b><th id='7gLFG'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='7gLFG'><tfoot id='7gLFG'></tfoot><dl id='7gLFG'><fieldset id='7gLFG'></fieldset></dl></div>

          <bdo id='7gLFG'></bdo><ul id='7gLFG'></ul>

        如何從 Visual Studio 2010 使用 SWIG 創建 DLL

        How to create a DLL with SWIG from Visual Studio 2010(如何從 Visual Studio 2010 使用 SWIG 創建 DLL)
          <tbody id='yLEyf'></tbody>
        <i id='yLEyf'><tr id='yLEyf'><dt id='yLEyf'><q id='yLEyf'><span id='yLEyf'><b id='yLEyf'><form id='yLEyf'><ins id='yLEyf'></ins><ul id='yLEyf'></ul><sub id='yLEyf'></sub></form><legend id='yLEyf'></legend><bdo id='yLEyf'><pre id='yLEyf'><center id='yLEyf'></center></pre></bdo></b><th id='yLEyf'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='yLEyf'><tfoot id='yLEyf'></tfoot><dl id='yLEyf'><fieldset id='yLEyf'></fieldset></dl></div>
        1. <tfoot id='yLEyf'></tfoot>

          <legend id='yLEyf'><style id='yLEyf'><dir id='yLEyf'><q id='yLEyf'></q></dir></style></legend>
              • <small id='yLEyf'></small><noframes id='yLEyf'>

                  <bdo id='yLEyf'></bdo><ul id='yLEyf'></ul>
                • 本文介紹了如何從 Visual Studio 2010 使用 SWIG 創建 DLL的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  數周以來,我一直在嘗試讓 Microsoft Visual Studio 2010 使用 SWIG 為我創建一個 DLL.如果你已經經歷過這個過程,你會不會好心給一個周到的一步一步的過程解釋?我在網上到處找,并花了很多時間試圖做到這一點;但我發現的所有教程都已過時或解釋不當.

                  I've been trying for weeks to get Microsoft Visual Studio 2010 to create a DLL for me with SWIG. If you have already gone through this process, would you be so kind as to give a thoughtful step-by-step process explanation? I've looked everywhere online and have spent many many hours trying to do this; but all of the tutorials that I have found are outdated or badly explained.

                  我已經成功地使用 cygwin 完成了這個過程;但正如你們中的一些人所知,cygwin DLL 不是很實用.

                  I have succeeded in going through this process with cygwin; but as some of you know, a cygwin DLL is not very practical.

                  因此,我知道可以一起創建 DLL 的 .i、.cpp 和 .h 文件.我只需要知道如何使用 Visual Studio C++ 2010 執行此操作.我的目標語言是 Python.

                  As a result, I have .i, .cpp, and .h files that I know can create a DLL together. I just need to know how to do this with Visual Studio C++ 2010. The language that I am targeting is Python.

                  推薦答案

                  分步說明.這假設您擁有源代碼并且正在構建一個將源直接鏈接到它的 DLL 擴展.在創建了一個工作項目后,我沒有回頭,所以我可能錯過了一些東西.如果您卡在某個步驟上,請評論此帖子.如果您有一個現有的 DLL 并且想要創建一個包裝它的 Python 擴展 DLL,則此步驟略有不同.如果你在這篇文章的評論方面需要幫助,我會擴展它.

                  Step-by-step instructions. This assumes you have the source and are building a single DLL extension that links the source directly into it. I didn't go back through it after creating a working project, so I may have missed something. Comment on this post if you get stuck on a step. If you have an existing DLL and want to create a Python extension DLL that wraps it, this steps are slightly different. If you need help with that comment on this post and I will extend it.

                  Edit 8/19/2012:如果從 C 示例開始,請不要在步驟 13 中使用 -c++ 并使用 .c> 代替 .cxx 用于步驟 14 和 19 中的包裝文件擴展名.

                  Edit 8/19/2012: If starting with a C example, don't use -c++ in step 13 and use .c instead of .cxx for the wrap file extension in steps 14 and 19.

                  1. 啟動 Visual Studio 2010
                  2. 從現有代碼文件、新建、項目...
                  3. 選擇Visual C++"項目類型,然后單擊下一步".
                  4. 輸入 .cpp/.h/.i 文件所在的項目文件位置.
                  5. 對于項目名稱,選擇 .i 文件中 %module 語句中使用的名稱(大小寫重要).
                  6. 選擇項目類型動態鏈接庫 (DLL) 項目",然后單擊下一步.
                  7. 將 Python.h 文件的路徑添加到包含搜索路徑,通常類似于C:Python27include",然后單擊下一步.
                  8. 點擊完成.
                  9. 右鍵單擊解決方案資源管理器中的項目、添加、現有項目...,然后選擇您的 .i 文件.
                  10. 右鍵單擊 .i 文件、屬性,然后選擇配置所有配置".
                  11. 將項目類型更改為自定義構建工具",然后單擊應用.
                  12. 在屬性中選擇自定義構建工具"(它會在上面應用后出現).
                  13. 輸入swig -c++ -python -outdir $(Outdir) %(Identity)"的命令行(假設 SWIG 在您的路徑中,并根據需要將生成的 .py 文件重定向到 Debug 或 Release 目錄).
                  14. 在輸出中輸入%(Filename)_wrap.cxx;$(Outdir)%(Filename).py".
                  15. 點擊確定.
                  16. 右鍵單擊 .i 文件,然后選擇編譯.
                  17. 右鍵單擊項目,添加、新建過濾器,將其命名為生成的文件".
                  18. 右鍵單擊生成的文件",單擊屬性",然后將SCC 文件"設置為假"(如果您使用源代碼控制,這會阻止 VS2010 嘗試在此過濾器中檢入生成的文件).
                  19. 右鍵單擊生成的文件",添加,退出項目,然后選擇編譯生成的 _wrap.cxx 文件.
                  20. 右鍵單擊項目、屬性.
                  21. 選擇配置所有配置".
                  22. 選擇 Configuration Properties、Linker、General、Additional Library Directories 并添加 python 庫的路徑,通常是C:Python27libs".
                  23. 選擇 Configuration Properties、General 并將 TargetName 設置為_$(ProjectName)".
                  24. 將目標擴展名設置為.pyd".
                  25. 構建項目的發布"版本.除非您構建 Python 本身的調試版本,否則您無法構建調試版本.
                  26. 打開一個控制臺,進入項目的 Release 目錄,運行 python,導入你的模塊,并調用一個函數!

                  這篇關于如何從 Visual Studio 2010 使用 SWIG 創建 DLL的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Why do two functions have the same address?(為什么兩個函數的地址相同?)
                  Why the initializer of std::function has to be CopyConstructible?(為什么 std::function 的初始化程序必須是可復制構造的?)
                  mixing templates with polymorphism(混合模板與多態性)
                  When should I use the keyword quot;typenamequot; when using templates(我什么時候應該使用關鍵字“typename?使用模板時)
                  Dependent name resolution amp; namespace std / Standard Library(依賴名稱解析命名空間 std/標準庫)
                  gcc can compile a variadic template while clang cannot(gcc 可以編譯可變參數模板,而 clang 不能)
                    • <tfoot id='oHGBb'></tfoot>

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

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

                          • 主站蜘蛛池模板: 毛片免费观看视频 | 91精品国产日韩91久久久久久 | 在线国产一区二区三区 | 国产成人99久久亚洲综合精品 | 日韩av在线免费 | av网站在线播放 | 国产激情一区二区三区 | 欧美精品中文字幕久久二区 | 精品综合 | 欧美日韩在线精品 | 在线观看av中文字幕 | 久久久久久亚洲欧洲 | 波多野结衣一区二区 | 欧美一区二区在线观看 | av网站在线看 | 久久久免费精品 | 影音先锋中文字幕在线观看 | 91精品国产乱码久久久久久久久 | 91亚洲精品在线 | 国产精品视频网站 | 性一交一乱一透一a级 | 奇米影视77 | 久久精品日 | 亚洲精品99999 | 欧日韩不卡在线视频 | 国产视频二区在线观看 | 欧美精品一区三区 | 啪啪综合网 | 91精品久久久久久综合五月天 | 免费精品 | 国产91九色 | 中文字幕视频在线 | 国产欧美精品一区二区 | 蜜桃av一区二区三区 | 高清黄色毛片 | 婷婷中文在线 | 国产在线精品一区二区三区 | 精品一区二区三区中文字幕 | 国产成人精品一区二区 | 久久精品国产一区二区电影 | 国产福利一区二区 |