使用命令:
dumpbin /EXPORTS E:\ProjectX\ZCB10_dev\Project\Intermediate\Build\Win64\x64\UnrealEditor\Development\Game\UnrealEditor-Game.lib > d:\EXPORTS5.txt
看到有哪些对象和函数在被导出了,清理掉不需要的。
https://learn.microsoft.com/en-us/cpp/build/reference/dumpbin-options?view=msvc-170&viewFallbackFrom=vs-2017
二、 添加了一个脚本
按顺序排序 类的导出函数的个数
from collections import Counter
# 文件路径
file_path = 'ClassNum.txt' # 替换为实际文件路径
output_file_path = 'output.txt' # 输出文件路径
# 创建一个 Counter 对象来统计字符串出现的次数
counter = Counter()
# 读取文件并统计
with open(file_path, 'r', encoding='utf-8') as file:
for line in file:
# 找到第一个 '@' 的位置
at_index = line.find('@')
if at_index != -1:
# 提取 '@' 后面的字符串
class_name = line[at_index + 1:].split('@')[0].strip()
counter[class_name] += 1
# 将结果按降序排序
sorted_counts = counter.most_common()
# 输出到文件
with open(output_file_path, 'w', encoding='utf-8') as output_file:
for class_name, count in sorted_counts:
output_file.write(f"{class_name}: {count}\n")
print(f"统计结果已输出到 {output_file_path}。")