zodiacon / TotalPE

Yet another PE Viewer
MIT License
137 stars 26 forks source link

vs2019:error C2039 #1

Open kouzhudong opened 2 years ago

kouzhudong commented 2 years ago

TotalPE\DebugView.cpp(10,23): error C2039: "format": 不是 "std" 的成员

zodiacon commented 2 years ago

Not sure I understand... C++20 is required, I use VS 2022

Adler-lug commented 2 years ago

If use /std:c++20 I get the same error, but if I use /std:c++latest, then this error disappears, but I get _Error C1047 The object or library file "..\External\Capstone\Capstone.lib" was created in a different compiler version than the other objects, for example "\TotalPE\x64\Release\enmape.lib"; all objects and libraries will be rebuilt using the same compiler version

I use VS 2022 with latest update.

Сould you post the precompiled version of the program? Thanks in advance

zodiacon commented 2 years ago

I use the VS 2022 preview, that might be the reason for the C++ version thing. The lib file for capstone is something I need to make sure makes it into the repo. The binary is in the AllTools repo (TotalPE.exe). Will be there in two minutes :)

kouzhudong commented 2 years ago

预览 - 最新 C++ 工作草案中的功能 (/std:c++latest)

选择这个,可消除一部分错误。

但是会出现:

已启动重新生成… 1>------ 已启动全部重新生成: 项目: enma_pe, 配置: Debug x64 ------ 1>stdafx.cpp 1>pe_bound_import.cpp 1>pe_builder.cpp 1>pe_exceptions_helper.cpp 1>pe_file_version_info.cpp 1>pe_headers_helper.cpp 1>pe_helper.cpp 1>pe_debug.cpp 1>pe_delay_import.cpp 1>pe_dotnet.cpp 1>pe_exceptions.cpp 1>pe_export.cpp 1>pe_image.cpp 1>pe_image_full.cpp 1>pe_image_io.cpp 1>pe_import.cpp 1>pe_loadconfig.cpp 1>pe_relocations.cpp 1>pe_resources.cpp 1>pe_resources_helper.cpp 1>pe_rtti_helper.cpp 1>正在生成代码... 1>正在编译... 1>pe_section.cpp 1>pe_section_io.cpp 1>pe_security.cpp 1>pe_string_helper.cpp 1>pe_tls.cpp 1>正在生成代码... 1>enma_pe.vcxproj -> D:\code\personal\zodiacon\TotalPE\x64\Debug\enma_pe.lib 2>------ 已启动全部重新生成: 项目: TotalPE, 配置: Debug x64 ------ 2>pch.cpp 2>AboutDlg.cpp 2>AppSettings.cpp 2>AssemblyView.cpp 2>BufferManager.cpp 2>DebugView.cpp 2>D:\code\personal\zodiacon\TotalPE\TotalPE\DebugView.cpp(35,7): error C2039: "sort": 不是 "std" 的成员 2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\map(25): message : 参见“std”的声明 2>D:\code\personal\zodiacon\TotalPE\TotalPE\DebugView.cpp(35,11): error C3861: “sort”: 找不到标识符 2>DirectoriesView.cpp 2>D:\code\personal\zodiacon\TotalPE\TotalPE\DirectoriesView.cpp(34,7): error C2039: "sort": 不是 "std" 的成员 2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\map(25): message : 参见“std”的声明 2>D:\code\personal\zodiacon\TotalPE\TotalPE\DirectoriesView.cpp(34,11): error C3861: “sort”: 找不到标识符 2>ExportsView.cpp 2>GenericWindow.cpp 2>ImportsView.cpp 2>MainFrm.cpp 2>MemoryBuffer.cpp 2>MessageTableView.cpp 2>PEImageView.cpp 2>PEStrings.cpp 2>ReadOnlyHexView.cpp 2>D:\code\personal\zodiacon\TotalPE\TotalPE\ReadOnlyHexView.cpp(97,27): error C2039: "GetDropdownMenuPoint": 不是 "ToolbarHelper" 的成员 2>D:\code\personal\zodiacon\TotalPE\WTLHelper\WTLHelper\ToolbarHelper.h(11): message : 参见“ToolbarHelper”的声明 2>D:\code\personal\zodiacon\TotalPE\TotalPE\ReadOnlyHexView.cpp(97,47): error C3861: “GetDropdownMenuPoint”: 找不到标识符 2>D:\code\personal\zodiacon\TotalPE\TotalPE\ReadOnlyHexView.cpp(98,84): error C2660: “IMainFrame::TrackPopupMenu”: 函数不接受 2 个参数 2>D:\code\personal\zodiacon\TotalPE\TotalPE\Interfaces.h(26,15): message : 参见“IMainFrame::TrackPopupMenu”的声明 2>RecentFilesManager.cpp 2>RelocationsView.cpp 2>ResourcesView.cpp 2>D:\code\personal\zodiacon\TotalPE\TotalPE\ResourcesView.cpp(71,7): error C2039: "sort": 不是 "std" 的成员 2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\map(25): message : 参见“std”的声明 2>D:\code\personal\zodiacon\TotalPE\TotalPE\ResourcesView.cpp(71,11): error C3861: “sort”: 找不到标识符 2>SectionsView.cpp 2>SecurityHelper.cpp 2>正在生成代码... 2>正在编译... 2>SecurityView.cpp 2>Selection.cpp 2>SimpleHexControl.cpp 2>TotalPE.cpp 2>VersionView.cpp 2>D:\code\personal\zodiacon\TotalPE\TotalPE\VersionView.cpp(29,7): error C2039: "sort": 不是 "std" 的成员 2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\map(25): message : 参见“std”的声明 2>D:\code\personal\zodiacon\TotalPE\TotalPE\VersionView.cpp(29,11): error C3861: “sort”: 找不到标识符 2>View.cpp 2>ViewManager.cpp 2>TextView.cpp 2>正在生成代码... 2>已完成生成项目“TotalPE.vcxproj”的操作 - 失败。 ========== 全部重新生成: 成功 1 个,失败 1 个,跳过 0 个 ==========