
[英]Why MINGW64 gcc produce much SLOWER code than MSVC for this source
我編譯了這個簡短的示例 example.c: 和: MINGW64 (MSYS2) (v.13.1.0) gcc -O3 示例.c 生成example.exe約250kB,啟動時程序執行約45s Microsoft Visual Studio 2022(C/C++ 優化編譯器版本 19.35.3 ...
[英]Why MINGW64 gcc produce much SLOWER code than MSVC for this source
我編譯了這個簡短的示例 example.c: 和: MINGW64 (MSYS2) (v.13.1.0) gcc -O3 示例.c 生成example.exe約250kB,啟動時程序執行約45s Microsoft Visual Studio 2022(C/C++ 優化編譯器版本 19.35.3 ...
[英]Windbg shows info dialog that it cannot open MFC source file from devdiv.visualstudio.com
Windbg 10.0.20348.1 在單步執行 MFC 代碼時顯示此信息對話框和以下消息: 文件'https://devdiv.visualstudio.com/DevDiv/_apis/git/repositories/msvc/items?path=src/vctools/VC7libs/ ...
[英]I'm trying to figure out some assembly language code generated by the Visual Studio compiler
我正在嘗試找出由我接管的舊 C++ 項目的調試版本生成的一些匯編代碼。 Windows-10 Visual Studio 2019。 我有一個看起來像這樣的方法調用: 這是生成的匯編代碼 評論是我的。 問題是“movs rep”行正在覆蓋 memory——來自不同 class 的本地數據成員。我可 ...
[英]Is there another way to get a COleDateTime object from another dialog using SendMessage?
我有注冊用戶留言。 這是處理程序: 引用的 function 是: 我使用這樣的代碼(為簡單起見,刪除了一些行): 第二個引用 function 是: 這個概念有效。 它將日期轉換為長整數,通過消息返回它並轉換回日期 object。 我只是想知道我是否可以將 object 作為日期變量傳遞? 這都 ...
[英]Question about compile and link stages and machine type
我正在使用 Visual Studio 2019 產品在 64 位 Windows 上進行 Windows 開發,如果我調查 32 位或 64 位程序的編譯和鏈接之間的差異,我只會注意到鏈接階段的差異。 32 位鏈接指定 /MACHINE:X86 而 64 位鏈接指定 /MACHINE:X64 但 ...
[英]cmake _ITERATOR_DEBUG_LEVEL and RuntimeLibrary mismatch detected
我正在學習使用以下命令構建庫 我在cmake --build.\build\期間收到以下錯誤 我在錯誤 LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main. ...
[英]How to get accumulated value of TextBox in WFA (.NET)?
我正在嘗試創建一個需要大約三個文本框值的程序。 然后將添加這些值以顯示它們的總數。 例子: 如前所述,它們會被添加。 目前很好但是,我正在嘗試創建一個運行總計以在我的表單中顯示它。 我通過使用+=的運算符來做到這一點。 看看下面的海灣: 但是,這會繼續連接值而不是添加它們。 我在 totalInp ...
[英]include vc_redist 2019 c++ as requirement in .net project
我有一個應用程序,其中一個 package (cefsharp) 具有 Microsoft Visual C++ Redistributable > 2019 的要求。 不幸的是,VS 在發布依賴於框架的單個文件時不會包含此要求。 當我啟動該應用程序時,如果尚未安裝,它會很好地詢問是否安裝 . ...
[英]Incorrect output for array sorting functions
每當我在 Visual Studio 中運行這個程序時,我都會遇到以下問題。 該程序當前輸出:Sorted array A: 11 33 55 77 99 Sorted array B: 22 44 66 88 Append B to A: 11 33 55 77 22 44 66 88 -85 ...
[英]Reinitialize dynamically allocated memory
我在使用的開頭動態分配 memory: 其中 Candset 和 Point_t 都是 typedef。 后來我在循環結束時釋放了 memory: 我這樣做的原因是因為我想在循環的所有迭代中重用相同的變量(內存空間)。 這實際上會導致堆碎片化。 因此,性能下降。 我該如何解決這個問題? 是否可以重 ...
[英]ldap_modify_ext_s fails with error 11 while writing data to active directory
我正在使用 Winldap API ldap_modify_ext_s 將數據寫入 Active Directory。 在數據不太大的情況下寫入成功。 但是當數據真的很大時,它會失敗並出現錯誤 11。錯誤 11 映射到 LDAP_ADMIN_LIMIT_EXCEEDED。 怎么做才能成功將數據寫入 ...
[英]How to interpret docs on WinMain?
請查看WinMain 文檔。int __clrcall WinMain( [in] HINSTANCE hInstance, [in] HINSTANCE hPrevInstance, [in] LPSTR lpCmdLine, [in] int nShowCm ...
[英]C++20 Modules std.ixx STL Static/Global Scope References
按照 Microsoft 的說明,我無法構建 std 模塊並且沒有版本控制錯誤,所以我繼續並添加了文件: C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.35.32213\modules\std.ixx ...
[英]_CrtisValidHeapPointer(block) error using SetConsoleCursorPosition function
開發控制台 Snake。 在程序結束時給出錯誤 _CrtisValidHeapPointer(block)。 根據經驗發現,問題出在第 32 行的 SetConsoleCursorPosition function 編譯器沒有發出任何錯誤消息,我可以輕松啟動應用程序,但是當我關閉主 window ...
[英]Setting up a python lab - pip install error VS C++
我正在按照一些指南來設置“量化堆棧”。 我安裝了 Anaconda3 並設置了一個環境並在終端中運行它然后運行以下命令: pip install pandas matplotlib matplotlib-inline scipy statsmodels backtrader pyfolio-rel ...
[英]How to bundle a static library with an import library (or two static libraries) with lib.exe?
Windows 上的 DLL 導入庫是一件很奇怪的事情。 他們捐贈了 linker 所需的膠水,以在生成的 PE 文件中創建導入存根(命名為.dll或.exe或其他名稱)。 此問答提供了有關如何在 Unix 端捆綁兩個 static 庫的詳細信息。 如何使用 Visual C++ 在 Windo ...
[英]How do you make a table in C++ console output?
這就是我的教授要求我們做的: 編寫一個程序,將 PI 打印為 double 類型和 float 類型,如下所示。 你的程序應該在一個循環中有一個 cout 語句,它在每次循環中改變寬度和精度。 不要為此問題編寫 10 個單獨的 cout 語句。 在表格中顯示 output,精度從 1 增加到 10 ...
[英]How to initialize a C++ class inside a DLL which was loaded via LoadLibrary()?
我從我的客戶那里得到了一個問題。 他們從他們的產品中刪除了一些 VC++ 項目,只有 dll。 現在他們想用這些 dll 中的一些函數處理一些數據。 假設這是 dll 中的一個 class。 而且,這是exe。 如果MyClass只有Sum() function,沒有構造函數,沒有像a和b這樣的成 ...
[英]Looking for a good Visual C++ 2010 compatible JSON parser that supports JsonPath for windows 32/64 bit platform. Any recommendation?
看過很多像下面這樣的: https://rapidjson.org/index.html - 支持 VC++ 2010。但是,不確定 JsonPATH https://github.com/danielaparker/jsoncons - 支持 JsonPATH。 但是,不確定 VC++ 201 ...
[英]transparent for browsers (WINAPI, LWA_COLORKEY)
我使用 WINAPI、SetWindowLong、SetLayeredWindowAttributes 和 LWA_COLORKEY (C++) 開發了一個在 Windows 10 中對 window 透明的工具。 它可以在任何 window 上運行,但是,它不能在 web 瀏覽器上運行。 我發現 ...