سؤال

Sometimes my Pebble watchapp rejects to build giving an unfriendly error message:

$ pebble build
[...]
[ 9/13] cprogram: build/src/project_lift.c.7.o build/appinfo.auto.c.7.o -> build/pebble-app.elf
/Users/Pavlo/pebble-dev/PebbleSDK-2.0.1/arm-cs-tools/bin/../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/lib/thumb2/libc.a(lib_a-sbrkr.o): In function `_sbrk_r':
/Users/thomas/work/arm-eabi-toolchain/build/newlib/arm-none-eabi/thumb2/newlib/libc/reent/../../../../../../../newlib-2012.09/newlib/libc/reent/sbrkr.c:60: undefined reference to `_sbrk'
collect2: error: ld returned 1 exit status

I have nothing to do with sbrkr.c directly. I've figured out that this is caused by the particular line of code in my app. Can I get more concise error message (like a callstack, maybe)?

هل كانت مفيدة؟

المحلول

You are trying to link to a function that is not supported by pebble like printf, sprintf, fopen, etc. Make sure the function you are calling are listed in Pebble api docs.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top