配置。h -没有这样的文件或目录。

时间:2023-02-09 22:56:15

The file 'safe-read.c' include the lib 'config.h', where is placed this file?

文件的safe-read。c'包含lib配置。h',这个文件放在哪里?

I've found many files with this name in the libs, but I don't know what the right one.

我在libs中找到了很多这个名字的文件,但是我不知道正确的是什么。

UPDATE

更新

I've my file with:

我我的文件:

...
#include <safe-read.h>
#include <safe-read.c>
...

in the file safe-read.c there's this include block

在文件safe-read。这包括block。

#include <config.h> //line 19

/* Specification.  */
#ifdef SAFE_WRITE
# include "safe-write.h"
#else
# include "safe-read.h"
#endif

/* Get ssize_t.  */
#include <sys/types.h>
#include <unistd.h>

#include <errno.h>

#ifdef EINTR
# define IS_EINTR(x) ((x) == EINTR)
#else
# define IS_EINTR(x) 0
#endif

#include <limits.h>

#ifdef SAFE_WRITE
# define safe_rw safe_write
# define rw write
#else
# define safe_rw safe_read
# define rw read
# undef const
# define const /* empty */
#endif

When I compile my file I've the following error:

当我编译我的文件时,我有以下错误:

file: X/Y/gnulib/lib/safe-read.c line: 19 message: fatal error: config.h: No such file or directory

文件:X / Y / gnulib / lib / safe-read。c行:19条消息:致命错误:config。h:没有这样的文件或目录。

2 个解决方案

#1


13  

config.h is normally generated by the ./configure script to reflect the target system's characteristics. In your case, it's tied into the whole gnulib "let's replace all the system's library functions with out own hacks" mess, so a lot of what's in a gnulib project config.h is stuff that gnulib's portion of configure generated.

配置。h通常由./configure脚本生成,以反映目标系统的特性。在您的案例中,它被绑定到整个gnulib中,“让我们用自己的小工具替换所有系统的库函数”,所以在gnulib项目配置中有很多内容。h是gnulib配置生成的部分。

#2


2  

You’re probably missing the libconfig-dev package from your system. Simply run the following command and it’ll fix it:

您可能丢失了系统中的libconfig-dev包。只需运行以下命令,它将修复:

sudo apt-get install libconfig-dev

sudo apt-get安装libconfig-dev

#1


13  

config.h is normally generated by the ./configure script to reflect the target system's characteristics. In your case, it's tied into the whole gnulib "let's replace all the system's library functions with out own hacks" mess, so a lot of what's in a gnulib project config.h is stuff that gnulib's portion of configure generated.

配置。h通常由./configure脚本生成,以反映目标系统的特性。在您的案例中,它被绑定到整个gnulib中,“让我们用自己的小工具替换所有系统的库函数”,所以在gnulib项目配置中有很多内容。h是gnulib配置生成的部分。

#2


2  

You’re probably missing the libconfig-dev package from your system. Simply run the following command and it’ll fix it:

您可能丢失了系统中的libconfig-dev包。只需运行以下命令,它将修复:

sudo apt-get install libconfig-dev

sudo apt-get安装libconfig-dev