vscode 10

C

[Makefile] make (e=2): recipe for target 'clean' failed

# 에러전문 PS D:\dev\Repositiory\Sandbox\C\Makefile_test> mingw32-make clean rm -f *.o\ process_begin: CreateProcess(NULL, rm -f *.o, ...) failed. make (e=2): . Makefile:21: recipe for target 'clean' failed mingw32-make: *** [clean] Error 2 # 해결방법 현재 사용하는 쉘이 뭔지 확인해보자... Powershell -> Windows Bash -> Linux Powershell에서는 rm 명령어를 "-rf"와 같은 플래그와 함께 사용할 수 없다.

C

[VSCode / C / C++] VSCode에서 Makefile 사용하기

# 실행환경 : vscode, mingw32 1. 실행할 프로젝트 생성 // hello.h #include void print_hello(); // hello.c #include "hello.h" void print_hello() { printf("Hello!!!\n"); } // main.c #include #include "hello.h" int main() { print_hello(); return 0; } # Makefile CC = gcc CFLAGS = -c -g LDFLAGS = OBJECTS = main.o hello.o run: all program all: program program : $(OBJECTS) $(CC) $(LDFLAGS) -o program $(OBJECTS) main...

Dev/C, C++ 2021.12.17

C

[Java] error: unmappable character (0xEC) for encoding x-windows-949 오류

# 에러 전문 Main.java:14: error: unmappable character (0xED) for encoding x-windows-949 int n = Integer.parseInt(br.readLine()); // ?븳湲? 二쇱꽍 ^ Main.java:14: error: unmappable character (0x80) for encoding x-windows-949 int n = Integer.parseInt(br.readLine()); // ?븳湲? 二쇱꽍 ^ Main.java:18: error: unmappable character (0xED) for encoding x-windows-949 while (n != 0) { // ?븳湲? 二쇱꽍 ^ Main.java:18: error: ..

C

[ vscode - JAVA ] Java 11 or more recent is required to run the Java extension 에러

vscode 실행시 마다 아래와 같이 Configure Java Runtime 설정 창이 계속 뜬다. # 에러 전문 Java 11 or more recent is required to run the Java extension. Please download and install a recent JDK. You can still compile your projects with older JDKs by configuring 'java.configuration.runtimes' # 해결하기 vscode에서는 더이상 Java 8 버전을 지원하지 않으므로, Java 11 버전 이상의 JDK를 설치해야 한다. Java 11을 설치한다면, 으로 설치 후, 화면 좌상단 File -> Preferences -> Setti..

C

[ VSCode - terminal ] .\activate.ps1 : 이 시스템에서 스크립트를 실행할 수 없으므로 ~~~ \activate.ps1 파일을 로드할 수 없습니다.

# 에러 전문 \activate.ps1 : 이 시스템에서 스크립트를 실행할 수 없으므로 \venv\Scripts\activate.ps1 파일을 로드할 수 없습니다. # 해결방법 Powershell을 관리자 권한으로 실행 Set-ExecutionPolicy Unrestricted 입력 후 Y 이제 vscode에서 teminal을 돌려도 에러가 뜨지 않는다. # 참조 https://stackoverflow.com/a/18713789

C

[ Python ] File "<stdin>", line 1 SyntaxError: invalid syntax

#에러 전문 >>> set PYTHONIOENCODING=utf8 ; if ($?) { py } "d:\dev\Repositiory\Python-prac\py_basic\prac3.py" File "", line 1 set PYTHONIOENCODING=utf8 ; if ($?) { py } "d:\dev\Repositiory\Python-prac\py_basic\prac3.py" ^ SyntaxError: invalid syntax # 해결법 code-runner 실행 설정에서 "code-runner.executorMap": { "python": "set PYTHONIOENCODING=utf8 | py" } 파이썬 항목을 이렇게 바꿔주면 된다. # 에러 발생이유 이미 실행되어있는 파이썬 인터프리터 내부..

C

[ vscode ] extension "Code Runner" 한글 깨짐 (python, c, cpp)

1. Code Runner 설정으로 들어간다. 2. setting.json 열기 # python 항목 수정 "python": "python -u", 를 아래와 같이 수정 "python": "set PYTHONIOENCODING=utf8 && python -u", # C, Cpp 항목 수정 "c": "chcp 65001 && cd $dir && gcc $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt", "cpp": "chcp 65001 && cd $dir && g++ $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",

Dev/Python 2021.03.17