2019/01(3)
-
[GIT] cpp 파일을 Binary file로 인식할 때
보통 인코딩 문제다. 특히 VS2017은 기본 인코딩이 UTF-16으로 되어있어서git에서는 바이너리로 인식하는 웃긴 상황이..git 외에도 여러 cross 플랫폼에서 문제가 될 수 있다. 1. VS Code로 UTF-8로 변경 뭔가 일괄 변경해야 될떈 어떻게 해야될지 모르겠는데 그건 그때 생각해보자. :) 2. VS에서 새 파일 생성시에 UTF-8로 사용하고 싶으면 프로젝트에 .editorconfig 파일을 만들고 캐릭터셋을 지정해주면 된다. root = true [*]charset = utf-8 이외에도 다양한 세팅이 가능한듯.
2019.01.15 -
[Network] inet_addr error. convert inet_pton
'inet_addr': Use inet_pton() or InetPton() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings inet_addr가 구버전 함수여서 권장하지 않는 API 함수이다.inet_pton으로 대체하면 된다. 1. Warning을 무시하는 방법1 #define _WINSOCK_DEPRECATED_NO_WARNINGS include 최상단에 해주면 되는듯하다. 2. Warning을 무시하는 방법2 프로젝트 속성 > 구성 속성 > C/C++ > 일반 > SDL 검사 > NO 3. inet_pton 사용하기 보통 이런 부분이 문제일텐데 // servAddr.sin_addr.s_addr =..
2019.01.14 -
[GIT] Git - fatal: Unable to create 'repos/.git/index.lock': File exists
$ git reset --hard origin/repos fatal: Unable to create 'repos/.git/index.lock': File exists. If no other git process is currently running, this probably means a git process crashed in this repository earlier. Make sure no other git process is running and remove the file manually to continue. 인덱싱 과정에서 프로세스가 비정상 종료 되면 발생하는 것으로 예상된다. 간단히 .git 폴더에 index.lock 파일을 지워주면 된다.에러 메시지도 다른 git 프로세스가 돌아가지 않으..
2019.01.03