How do I link glibc's implementation of iconv?

本小妞迷上赌 提交于 2019-12-03 08:42:06

Your program seems fine and compiles fine on my system (Mandriva Linux 2010.1).

I find the libiconv_* references in your compile log worrisome, though. Are you sure that the iconv.h version that gets included comes from glibc and not from a separate libiconv implementation, such as GNU libiconv? It sounds as if it adds a lib prefix to all iconv functions to avoid symbol collisions with the iconv implementation of the C library that came with the system.

Having to explicitly link to libiconv points to a separate iconv implementation too - glibc does not need it.

EDIT:

For the record, I just verified that using the iconv.h header file from libiconv without explicitly linking against it will produce exactly the result that you are seeing - it renames all iconv functions by adding a lib prefix to their names.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!