首页 > 解决方案 > 从二进制 dll 中删除 protobuf-lite C++ 编译路径字符串

问题描述

这个问题与Remove protobuf c++ compiled path string from binary的问题相同。

我在 Visual Studio 2017 中使用 Protobuf 3.15.8 lite。我编译了 lite 版本 .lib 并编译了我自己的 dll 以在 C++ dll 和 C# 程序之间进行转换。我确实在 Visual Studio 中设置了发布设置,例如删除调试信息等,并将 protobuf.lib 更改为 protobuf-lite.lib 以及该问题中的其他答案。

生成的dll仍然包含以下路径(只有这四个):

D:\{mypath}\protobuf-3.15.8\src\google\protobuf\message_lite.cc
D:\{mypath}\protobuf-3.15.8\src\google\protobuf\wire_format_lite.cc
D:\{mypath}\protobuf-3.15.8\src\google\protobuf\arena.cc
D:\{mypath}\protobuf-3.15.8\src\google\protobuf\parse_context.h

我还能做哪些配置来解决这个问题?是什么导致了这个问题?

标签: c++protobuf-c

解决方案


推荐阅读