AnsweredAssumed Answered

sscanf undefined reference error for ICC in buildroot

Question asked by liyq on Sep 12, 2012
Latest reply on Sep 17, 2012 by Aaronwu

Hi,

 

I arm trying the ICC in buildroot, i have added a sscanf function in the utput/build/icc-10740/example/task/mcapi_msg1.c, when compiling it, the buildroot shown

 

added sscanf function:

sscanf ("1234:1223", "%d:%d", &t1, &t);

 

error:

make[1]: Entering directory `/opt/buildroot/output/build/icc-10740/example/task'

bfin-elf-ld -static  -o mcapi_msg1 -T coreb_task.lds --just-symbol ../../icc_core/icc mcapi_msg1.o /opt/buildroot/output/host/usr/bfin-unknown-linux-uclibc/sysroot/usr/lib/libmcapi_coreb.a  -Ttext 0x7c00000

mcapi_msg1.o: In function `recv_loopback':

/opt/buildroot/output/build/icc-10740/example/task/mcapi_msg1.c:45: undefined reference to `sscanf'

/opt/buildroot/output/build/icc-10740/example/task/mcapi_msg1.c:45: undefined reference to `sscanf'

make[1]: *** [mcapi_msg1] Error 1

make[1]: Leaving directory `/opt/buildroot/output/build/icc-10740/example/task'

make: *** [icc_task-build] Error 2

 

I can saw the stdio.h in the included segment of mcapi_msg1.c, also, i can saw the sscanf function defined in the /opt/uClinux/bfin-elf/bfin-elf/include/stdio.h, but i always got above shown error, how i can fix it. thank you

 

I used following toolchain and buildroot version

1. 2012R1 for buildroot

2. bfin-elf-gcc (ADI-trunk/git-e19152e) 4.3.5

3. GNU ld (ADI-trunk/git-e19152e) 2.21

4. bfin-linux-uclibc-gcc (ADI-2012R1-BETA1) 4.3.5

Outcomes