带有 -m16 标志的 GCC 无法编译

问题描述

我使用的是 Debian 操作系统:

x@y:~$ uname -a
Linux clunasvm 4.19.0-13-amd64 #1 SMP Debian 4.19.160-2 (2020-11-28) x86_64 GNU/Linux

和海湾合作委员会:

x@y:~$ gcc --version
gcc (Debian 8.3.0-6) 8.3.0
Copyright (C) 2018 Free Software Foundation,Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

我有一个 Hello World C++ 应用程序,我想用 -m16 标志编译它以生成 16 位代码。当我向编译器添加标志时,代码不会编译:

g++ -O0 -g3 -Wall -c -fmessage-length=0 -m16 -MMD -MP -MF"src/test.d" -MT"src/test.o" -o "src/test.o" "../src/test.cpp"
In file included from /usr/include/features.h:448,from /usr/include/x86_64-linux-gnu/c++/8/bits/os_defines.h:39,from /usr/include/x86_64-linux-gnu/c++/8/bits/c++config.h:508,from /usr/include/c++/8/iostream:38,from ../src/test.cpp:9:
/usr/include/x86_64-linux-gnu/gnu/stubs.h:7:11: fatal error: gnu/stubs-32.h: No such file or directory
 # include <gnu/stubs-32.h>
           ^~~~~~~~~~~~~~~~
compilation terminated.

我还缺少什么才能在 x86-64 机器上生成基于 16 位的代码?我需要这个的原因是为了在代码中模拟 16 位 CPU 行为。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...