embeded/Cortex-M4 Ti2016. 4. 12. 18:02

keil 에서 --c99주고 이런 에러 발생.

[링크 : http://www.keil.com/support/man/docs/uv4/uv4_dg_adscc.htm]

[링크 : http://www.keil.com/support/man/docs/armcc/armcc_chr1359124904416.htm]


uint32_t 등은 c99 타입인데...

#include <stdint.h>

#include <stdbool.h>

를 추가해주면 일단 패스

[링크 : http://www.keil.com/forum/17012/]

[링크 : http://www.keil.com/support/man/docs/armcc/armcc_chr1359124241645.htm]


error:  #1059-D: an entity with internal linkage cannot be referenced within an inline function with external linkage


굳이 해석하자면...

internal linkage와 함께 있는 항목(entity)은 external linkage와 함께 있는 inline function안에서 참조될 수 없다.



음.. inline 대신 static으로 쓰도록 해야 하는건가?

Note that instead of using static for internal linkage it is better to use anonymous namespaces into which you can also put classes. The linkage for anonymous namespaces has changed between C++98 and C++11 but the main thing is that they are unreachable from other translation units.

[링크 : http://stackoverflow.com/questions/1358400/what-is-external-linkage-and-internal-linkage-in-c]


클래스 내에서 안써서 그런가?

[링크 : https://msdn.microsoft.com/en-us/library/bw1hbe6y.aspx]



+

2018.04.20

일단.. extern __inline 으로 하니 문제없이 빌드는 됨.

'embeded > Cortex-M4 Ti' 카테고리의 다른 글

TM4C1231E6PM ADC  (0) 2016.05.20
tm4c1231e6pm / lm3s1607 타이머 차이점...?  (0) 2016.05.06
tm4c1231e6pm DIV400 ?  (0) 2016.04.12
lm3s1607 대체제 검색중..  (0) 2016.04.12
cortex-m4용 ti 라이브러리 tivaware  (0) 2016.04.12
Posted by 구차니