iconv。h:没有终止这样的文件或目录编译。

时间:2021-10-13 08:40:00

I installed libiconv from http://www.gnu.org/software/libiconv/.

我在http://www.gnu.org/software/libiconv/上安装了libiconv。

$ ./configure --prefix=/usr/local
$ make
$ make install

Then I add #include <iconv.h> declaration in my project.

然后添加#include 声明在我的项目。 。h>

I am getting following error how can I fix this?

我有以下错误我该如何解决这个问题?

fatal error: iconv.h: No such file or directory
compilation terminated.

P.S. I am using OS X.

附注:我使用的是OS X。

1 个解决方案

#1


1  

Chances are, /usr/local/include is not in your default include path. Try adding -I/usr/local/include to your compilation command.

可能是,/usr/local/include不在您的默认包含路径中。尝试在编译命令中添加-I/usr/local/include。

#1


1  

Chances are, /usr/local/include is not in your default include path. Try adding -I/usr/local/include to your compilation command.

可能是,/usr/local/include不在您的默认包含路径中。尝试在编译命令中添加-I/usr/local/include。