프로그래밍 언어2018. 10. 4. 08:38

Spring Tool Suite을 사용하고 있는데, 뭐 이게 Eclipse 이다.

이클립스는 안드로이드 개발할 때 많이 사용 해 봤는데, 보통 자바 소스에 에러가 있으면, 패키지 탐색기(Package Explorer)의 해당 파일에 빨간색 엑스자가 표시되곤 했다.

당연히 그렇게 될거라 생각하고 있었고, 외부에서 파일들을 수정하고 STS를 열었는데, 패키지 탐색기에 에러 표시가 없었다. 그래서 에러가 없구나 생각하고, commit을 push 했는데... 왠걸;; 에러가 있었다. (이것땜에 졸 삽질;;)


암튼 그래서 이래저래 검색을 하다 보니, 역시나 구글신이 답했다.

외국(미국)에서는 빨간색 엑스 표시를 red-x icon 이라고 하더라.

결국, 이게 표시되지 않는 문제는, CDT를 추가로 설치하면 해결 된다.

이것이 문제인 것인지, CDT의 부가기능인 것인지는 확실하지 않다.


내가 참고했던 포스트는 아래 경로임.

https://www.mkyong.com/eclipse/eclipse-red-x-icon-didnt-display-on-project-explorer/


Posted by 세월의돌
리눅스 & 안드로이드2018. 8. 13. 10:51

Dual ABI https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html

프로젝트 빌드를 하다가 링크에러가 발생했는데, 전혀 예상하지 못했던 링크 에러라 뭔가 싶었다.


구글신을 통해 에러메시지를 가지고 검색 해 보니, Dual ABI를 알려 주었다.

대략 내용은 이러하다. GCC가 C++11 Comformance를 위해 5.0에서부터 std::string과 std::list를 새로 개발 했는데, std::string과 std::list는 오만데서 엄청 사용하고 있는 놈들이니, 두 버전을 동시에 지원해 줘야해서 define을 하나 추가 했다는 것.

기본은 새로운 구현이 활성화 되어 있고, 끄고 싶으면 _GLIBCXX_USE_CXX11_ABI=0 을 추가해 주어야 한다.


내가 만났던 링크 에러 메시지의 부분을 발췌하면 다음과 같다.


undefined reference to ... (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)

undefined reference to ... std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >[abi:cxx11]

undefined reference to ... [abi:cxx11]

undefined reference to ... (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, ...)

collect2: error: ld returned 1 exit status


문서 상에서는 친절하게(?) 아래와 같이 안내하고 있음.

If you get linker errors about undefined references to symbols that involve types in the std::__cxx11 namespace or the tag [abi:cxx11] then it probably indicates that you are trying to link together object files that were compiled with different values for the _GLIBCXX_USE_CXX11_ABI macro. This commonly happens when linking to a third-party library that was compiled with an older version of GCC. If the third-party library cannot be rebuilt with the new ABI then you will need to recompile your code with the old ABI.


Posted by 세월의돌