반응형

Makefile:4: *** missing separator.  Stop. VScode

 

Vscode로 Makefile을 만들고 make 명령어를 실행하면

 

Makefile:4: *** missing separator.  Stop.

이런 오류가 발생할 수 있다.

 

이 오류가 발생하는 이유는 Makefile의 형식에 맞지 않기 때문이다.

 

이유는 모르겠으나 Makefile은 tab을 통한 공백과 그냥 space를 통한 공백을 구분한다

 

 

파란색으로 드래그가 된 부분을

 

tab을 쳐서 띄워주고 작성해야 오류를 피할 수 있다.

 

그래도 해결되지 않는다면

 

perl -pi -e 's/^  */\t/' (Makefile파일이름)

이 명령을 실행해보자

 

 

참고자료

https://stackoverflow.com/questions/16931770/makefile4-missing-separator-stop

 

makefile:4: *** missing separator. Stop

This is my makefile: all:ll ll:ll.c gcc -c -Wall -Werror -02 c.c ll.c -o ll $@ $< clean : \rm -fr ll When I try to make clean or make make, I get this error: :makefile:4: *** m...

stackoverflow.com

 

+ Recent posts