Xcode broke YouCompleteMe error highlighting

will

I was working a project in C++ and all of the sudden my Mac said that Xcode was finished updating, so I just exited out of the popup and didn't think anything of it. I went back to my project and tried to run my makefile and it said I need to be root to accept Xcode's terms. So, I just booted up Xcode, accepted the terms, and quit. Now, when I work on my project in Vim, I am getting all kinds of errors. E.g.

#include<iostream>  // 'iostream' file not found
#include<string>

int main()
{   
    std::cout << "hello" << std::endl; // use of undeclared identifier 'std'
    return 0;
} 

I have no idea what has happened. Can anybody help me?

I use g++ to compile and this is the output of g++ --version:

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-    include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.0 (clang-600.0.51) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin13.3.0
Thread model: posix

My Xcode version is now 6.0.1.

All this being said, I still seem to be able to compile my code. I am just getting all types of errors in Vim, related somehow to this Xcode update.

I use YouCompleteMe for error highlighting.

will

I believe I have found the solution. I am assuming that when Xcode updated, its folder structure changed.

I fixed this issue by changing my .ycm_extra_conf.py. I changed the flag line

'/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1'

to

'/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1',

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

TOP 리스트

  1. 1

    ImageJ-히스토그램 빈을 변경할 때 최대, 최소 값이 변경되는 이유는 무엇입니까?

  2. 2

    상황에 맞는 메뉴 색상

  3. 3

    Excel : 합계가 N보다 크거나 같은 상위 값 찾기

  4. 4

    Oracle VirtualBox-설치를 위해 게스트를 부팅 할 때 호스트 시스템이 충돌 함

  5. 5

    ExecuteNonQuery- 연결 속성이 초기화되지 않았습니다.

  6. 6

    Cassandra에서 버전이 지정된 계층의 효율적인 모델링

  7. 7

    원-사각형 충돌의 충돌 측면을 찾는 문제

  8. 8

    Matlab의 반복 Sortino 비율

  9. 9

    Apache POI를 사용하여 xlsx를 읽는 동안 주 스레드의 NoSuchMethodError

  10. 10

    Android에서 Drawable을 int로 또는 그 반대로 변환하는 방법

  11. 11

    어떻게 같은 CustomInfoWindow 다른 이벤트를 할 수 있습니다

  12. 12

    openCV python을 사용하여 텍스트 문서에서 워터 마크를 제거하는 방법은 무엇입니까?

  13. 13

    JQuery datepicker 기능이 인식되지 않거나 새 프로젝트에서 작동하지 않음

  14. 14

    PyCharm에서 프로젝트를 제거하는 방법은 무엇입니까?

  15. 15

    regedit에서 방금 내 보낸 Windows 레지스트리 가져 오기 문제

  16. 16

    C ++ VSCode에서 같은 줄에 중괄호 서식 지정

  17. 17

    Python 사전을 사용하는 동안 "ValueError : could not convert string to float :"발생

  18. 18

    자바 스크립트로 duolingo 형 문장 연습을 개발 중입니다. 구현했지만 더 개선이 필요합니다

  19. 19

    react-redux 저장소의 상태 변수는 console.log 후에 정의되지 않습니까?

  20. 20

    cURL 명령은 git bash에서는 작동하지만 cmd 및 powershell에서는 작동하지 않습니다.

  21. 21

    JavaFX : TilePane을 중앙에 배치하고 TilePane 자식을 왼쪽에서 오른쪽으로 배치하는 방법은 무엇입니까?

뜨겁다태그

보관