Page 1 of 1

想要实现编码转换,然而编译错误 undefined reference to `iconv_open'

Posted: Fri Mar 27, 2020 8:51 am
by chenqing_lang
1585298867(1).png
编译结果
1585298867(1).png (121.18 KiB) Viewed 5351 times
我自己代码中已经写好#include <iconv.h>的了

Code: Select all

#include "include.h"

#include <iconv.h>

extern struct demoksApi demoks;

void System_SleepLoop(void)
{                                                                   
    unsigned char key;
    char string[32];
    

    Gpio_init();
    
    OLED_Init();
    OLED_DispStr16(0,0,"Startup..",0);
    OLED_DispStr16(0,2,"启动..",0);

    printf("启动..\r\n");
    
    
    iconv_t cd;

    iconv_open("gb2312","utf-8");

    printf("iconv_open()\r\n");

Re: 想要实现编码转换,然而编译错误 undefined reference to `iconv_open'

Posted: Sat Mar 28, 2020 1:02 pm
by ESP_Gargamel
esp-idf 中没有对 iconv 的支持,需要自行移植如 libiconv。