【发布时间】:2018-07-08 10:36:06
【问题描述】:
我正在尝试从这个 stackexchange 答案编译代码:https://reverseengineering.stackexchange.com/a/16631/12521
添加系统导入和类定义后,我从http://formats.kaitai.io/elf/csharp.html 下载Elf.cs 并尝试编译它mcs -out:unpack.exe Elf.cs unpack.cs。但是,这会失败并出现以下错误:
Elf.cs(890,21): error CS0102: The type `Kaitai.Elf' already contains a definition for `Bits'
Elf.cs(97,21): (Location of the symbol related to previous error)
Elf.cs(895,23): error CS0102: The type `Kaitai.Elf' already contains a definition for `Endian'
Elf.cs(16,21): (Location of the symbol related to previous error)
Compilation failed: 2 error(s), 0 warnings
运行 mcs Elf.cs 会产生相同的错误。不幸的是,我不是 C# 专家。我怎样才能让它正确编译。
【问题讨论】: