gpt4 book ai didi

linux - 编译时 Ubuntu 14.04 中的 Oracle Developer Studio : Cannot find sys/cdefs. h

转载 作者:太空宇宙 更新时间:2023-11-04 10:33:50 31 4
gpt4 key购买 nike

所以我只是按照 Oracles 站点上的说明安装了 Oracle Developer Studio 12.5 的 tarfile 版本。使用以下方法测试安装:

https://docs.oracle.com/cd/E37069_01/html/E37072/gozue.html#scrolltoc

编译时发现

cc -V hello.c

我收到以下错误(由于 stackoverflow 限制,只有一小部分):

"/home/craig/Programs/OracleDeveloperStudio12.5-linux-x86-bin/developerstudio12.5/lib/compilers/include/cc/sys/cdefs.h", line 9: cannot find include file: <sys/cdefs.h>
"/usr/include/features.h", line 388: cannot find include file: <gnu/stubs.h>
"/home/craig/Programs/OracleDeveloperStudio12.5-linux-x86-bin/developerstudio12.5/lib/compilers/include/cc/stddef.h", line 39: syntax error before or at: typedef
"/usr/include/stdio.h", line 35: cannot find include file: <bits/types.h>
"/usr/include/stdio.h", line 48: syntax error before or at: typedef
"/usr/include/stdio.h", line 53: syntax error before or at: __USING_NAMESPACE_STD
"/usr/include/_G_config.h", line 9: cannot find include file: <bits/types.h>
"/usr/include/_G_config.h", line 23: syntax error before or at: __off_t
"/usr/include/_G_config.h", line 28: syntax error before or at: __off64_t
"/home/craig/Programs/OracleDeveloperStudio12.5-linux-x86-bin/developerstudio12.5/lib/compilers/include/cc/va_impl.h", line 168: parameter not in identifier list: __builtin_va_start
"/home/craig/Programs/OracleDeveloperStudio12.5-linux-x86-bin/developerstudio12.5/lib/compilers/include/cc/va_impl.h", line 170: parameter not in identifier list: __builtin_va_arg_incr
"/home/craig/Programs/OracleDeveloperStudio12.5-linux-x86-bin/developerstudio12.5/lib/compilers/include/cc/sys/cdefs.h", line 9: cannot find include file: <sys/cdefs.h>
"/usr/include/libio.h", line 154: void parameter cannot have name: _IO_lock_t
"/usr/include/libio.h", line 274: syntax error before or at: __off_t
"/usr/include/libio.h", line 293: syntax error before or at: __off64_t
"/usr/include/libio.h", line 320: only "register" valid as formal parameter storage class
"/usr/include/libio.h", line 320: parameter not in identifier list: _IO_2_1_stdin_
"/usr/include/libio.h", line 320: incomplete struct/union/enum _IO_FILE_plus: _IO_2_1_stdin_
"/usr/include/libio.h", line 321: only "register" valid as formal parameter storage class
"/usr/include/libio.h", line 321: parameter not in identifier list: _IO_2_1_stdout_
"/usr/include/libio.h", line 322: only "register" valid as formal parameter storage class
"/usr/include/libio.h", line 322: parameter not in identifier list: _IO_2_1_stderr_
"/usr/include/libio.h", line 338: syntax error before or at: __io_read_fn
"/usr/include/libio.h", line 338: parameter not in identifier list: __io_read_fn
"/usr/include/libio.h", line 346: syntax error before or at: __io_write_fn
"/usr/include/libio.h", line 346: parameter not in identifier list: __io_write_fn
"/usr/include/libio.h", line 355: syntax error before or at: __off64_t
"/usr/include/libio.h", line 390: only "register" valid as formal parameter storage class
"/usr/include/libio.h", line 390: syntax error before or at: *

特别是它说找不到的第一部分。现在该文件存在于指定的目录中,所以我不知道是什么原因造成的。请注意,但是当使用

的默认 PATH 时,代码可以正常编译
/usr/local/bin

只有当我将 PATH 设置为

/home/craig/Programs/OracleDeveloperStudio12.5-linux-x86-bin/developerstudio12.5/bin

当它在站点上请求测试安装时,会出现这些错误。在 solstudio 中编译任何项目示例时也是如此。我想我必须更新或安装一些额外的软件包,但我不确定哪些是这样,或者坦率地说这里发生了什么。该站点似乎只提供 Oracle Solaris 的更新或补丁,而不是 Ubuntu 或 Linux,所以不知道该怎么做。抱歉,如果这很简单。不是高级 Linux 用户并且是第一次使用 Oracle Developer Studio。正如标题所说,我在 Ubuntu 14.04 下运行,根据我从文档中收集到的信息,它应该与 Ubuntu 操作系统兼容。

最佳答案

cannot find include file: <sys/cdefs.h> 
cannot find include file:<gnu/stubs.h>
cannot find include file: <bits/types.h>

请执行:sudo apt update && sudo apt install g++

... 这也在安装使 gcc 完全工作的文件:libc6-dev、linux-libc-dev。

关于linux - 编译时 Ubuntu 14.04 中的 Oracle Developer Studio : Cannot find sys/cdefs. h,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38494191/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com