![-lm을 찾을 수 없음 링커 오류](https://linux55.com/image/109631/-lm%EC%9D%84%20%EC%B0%BE%EC%9D%84%20%EC%88%98%20%EC%97%86%EC%9D%8C%20%EB%A7%81%EC%BB%A4%20%EC%98%A4%EB%A5%98.png)
이 질문은 다음 질문과 밀접한 관련이 있습니다.찾을 수 없음 -lm, 그러나 교차 G++ 링커를 호출하면 오류가 발생합니다.
아래 제공된 문서를 따르려고 합니다.ARTIK SDK와 함께 Eclipse 사용. "SDK 프로젝트 만들기 - Linux" 섹션을 실행하는 동안 다음 오류가 발생했습니다.
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)
크로스 G++ 링커를 호출하는 중에 문제가 발생했습니다. 코드를 ARTIK로 전송하면 다음 오류가 발생합니다.
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
어떡해?