This question is highly related to cannot find -lm, but the error appears when I'm invoking cross G++ Linker.
I'm trying to follow through the documentation provided by Using Eclipse with ARTIK SDK. While following through the part 'Creating SDK project - Linux', I've encountered the following error:
18:02:24 **** Incremental Build of configuration Default for project gpio-test ****
make all
Building target: gpio-test
Invoking: Cross G++ Linker
arm-linux-gnueabihf-g++ -L"/opt/sysroots/artik-sysroot/usr/lib" --sysroot=/opt/sysroots/artik-sysroot -o "gpio-test" ./artik_gpio_test.o -lartik-sdk-base
/opt/toolchains/gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/5.4.1/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lm
collect2: error: ld returned 1 exit status
make: *** [gpio-test] Error 1
18:02:24 Build Finished (took 63ms)
There is a problem invoking cross G++ linker. If I transmit the code to ARTIK, then I get the following error:
Last login: Thu Apr 13 21:10:38 2017 from 192.168.0.11
/root/gpio-test/artik_gpio_test.c;exit
[root@artik ~]# /root/gpio-test/artik_gpio_test.c;exit
/root/gpio-test/artik_gpio_test.c: line 10: enum: command not found
/root/gpio-test/artik_gpio_test.c: line 11: R: command not found
/root/gpio-test/artik_gpio_test.c: line 12: G: command not found
/root/gpio-test/artik_gpio_test.c: line 13: B: command not found
/root/gpio-test/artik_gpio_test.c: line 14: syntax error near unexpected token `}'
/root/gpio-test/artik_gpio_test.c: line 14: `};'
logout
What can I do?
