无法使用g++ MinGW编译器编译Hyperion1.2

无法使用g++ MinGW编译器编译Hyperion1.2

嘿我正在尝试编译海伯利安1.2并且出现错误。这是我正在使用的命令:

x86_64-w64-mingw32-g++ Hyperion-1.2/Src/Crypter/hyperion.cpp -o Hyperion.exe

我收到的错误:

/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0x4b1): undefined reference to `hyperion::OstreamLog::OstreamLog(bool)'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0x550): undefined reference to `hyperion::OstreamLog::operator<<(std::ostream& (*)(std::ostream&))'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0x563): undefined reference to `hyperion::OstreamLog::operator<<(char const*)'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0x572): undefined reference to `hyperion::OstreamLog::operator<<(std::ostream& (*)(std::ostream&))'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0x585): undefined reference to `hyperion::OstreamLog::operator<<(char const*)'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0x594): undefined reference to `hyperion::OstreamLog::operator<<(std::ostream& (*)(std::ostream&))'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0x5a7): undefined reference to `hyperion::OstreamLog::operator<<(char const*)'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0x5b6): undefined reference to `hyperion::OstreamLog::operator<<(std::ostream& (*)(std::ostream&))'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0x5c9): undefined reference to `hyperion::OstreamLog::operator<<(std::ostream& (*)(std::ostream&))'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0x5e8): undefined reference to `hyperion::FileInMemory::FileInMemory(char const*)'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0x62a): undefined reference to `hyperion::PE32Analysis::PE32Analysis(hyperion::FileInMemory*)'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0x670): undefined reference to `hyperion::FileInMemory::~FileInMemory()'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0x695): undefined reference to `hyperion::OstreamLog::operator<<(std::ostream& (*)(std::ostream&))'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0x6a8): undefined reference to `hyperion::OstreamLog::operator<<(char const*)'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0x6b7): undefined reference to `hyperion::OstreamLog::operator<<(std::ostream& (*)(std::ostream&))'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0x6ca): undefined reference to `hyperion::OstreamLog::operator<<(char const*)'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0x6d9): undefined reference to `hyperion::OstreamLog::operator<<(std::ostream& (*)(std::ostream&))'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0x6ec): undefined reference to `hyperion::OstreamLog::operator<<(char const*)'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0x6fb): undefined reference to `hyperion::OstreamLog::operator<<(std::ostream& (*)(std::ostream&))'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0x70e): undefined reference to `hyperion::OstreamLog::operator<<(std::ostream& (*)(std::ostream&))'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0x72c): undefined reference to `hyperion::createFasmInfileArray(hyperion::FileInMemory*, unsigned int, unsigned int)'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0x763): undefined reference to `hyperion::FileInMemory::~FileInMemory()'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0x798): undefined reference to `hyperion::createFasmInclude(char const*, char const*, unsigned int)'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0x7cf): undefined reference to `hyperion::FileInMemory::~FileInMemory()'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0x804): undefined reference to `hyperion::createFasmInclude(char const*, char const*, unsigned int)'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0x83b): undefined reference to `hyperion::FileInMemory::~FileInMemory()'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0x860): undefined reference to `hyperion::createFasmKeySize(unsigned int, unsigned int)'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0x897): undefined reference to `hyperion::FileInMemory::~FileInMemory()'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0x8b7): undefined reference to `hyperion::createFasmLogfileInc(bool)'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0x8ee): undefined reference to `hyperion::FileInMemory::~FileInMemory()'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0x975): undefined reference to `hyperion::FileInMemory::~FileInMemory()'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0x99a): undefined reference to `hyperion::OstreamLog::operator<<(char const*)'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0x9a9): undefined reference to `hyperion::OstreamLog::operator<<(std::ostream& (*)(std::ostream&))'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0x9bc): undefined reference to `hyperion::OstreamLog::operator<<(char const*)'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0x9cb): undefined reference to `hyperion::OstreamLog::operator<<(std::ostream& (*)(std::ostream&))'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0x9de): undefined reference to `hyperion::OstreamLog::operator<<(char const*)'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0x9ed): undefined reference to `hyperion::OstreamLog::operator<<(std::ostream& (*)(std::ostream&))'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0xa00): undefined reference to `hyperion::OstreamLog::operator<<(std::ostream& (*)(std::ostream&))'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0xc04): undefined reference to `hyperion::OstreamLog::operator<<(char const*)'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0xc13): undefined reference to `hyperion::OstreamLog::operator<<(std::ostream& (*)(std::ostream&))'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0xc26): undefined reference to `hyperion::OstreamLog::operator<<(char const*)'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0xc38): undefined reference to `hyperion::OstreamLog::operator<<(char const*)'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0xc47): undefined reference to `hyperion::OstreamLog::operator<<(std::ostream& (*)(std::ostream&))'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0xc5a): undefined reference to `hyperion::OstreamLog::operator<<(char const*)'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0xc6c): undefined reference to `hyperion::OstreamLog::operator<<(char const*)'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0xc7b): undefined reference to `hyperion::OstreamLog::operator<<(std::ostream& (*)(std::ostream&))'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0xd90): undefined reference to `hyperion::FileInMemory::~FileInMemory()'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0xece): undefined reference to `hyperion::FileInMemory::~FileInMemory()'
/tmp/ccKr1FvG.o:hyperion.cpp:(.text+0xfc0): undefined reference to `hyperion::OstreamLog::OstreamLog(bool)'
collect2: error: ld returned 1 exit status

答案1

安装 mingw-64 后,运行以下命令:

i686-w64-mingw32-c++  Hyperion-1.2/Src/Crypter/*.cpp -o hyperion.exe 

这是使用 MingW 编译 Hyperion 所需的命令。您尝试使用的命令对我来说也不起作用。上面有。

答案2

在执行编译之前,您需要先安装软件包mingw-w64(例如)。aptitude install mingw-w64

相关内容