1
이 내가 내 UNIX에서 실행 내 C++ 메이크입니다 :명령은
# This is a Makefile for the SocNetwork project
CCC = g++
CXXFLAGS = -Wall -g
CXXLINK = $(CCC)
OBJS = Message.o Date.o main.o SocialNetwork.o User.o
RM enter code here= rm -f
all: SocNetwork
# Creating the executable (SocNetwork)
SocNetwork: $(OBJS)
$(CXXLINK) -o SocNetwork $(OBJS)
# Creating object files using default rules
Date.o: Date.C Date.H
main.o: main.C SocialNetwork.H User.H defs.H Date.H Message.H
Message.o: Message.C Message.H defs.H
SocialNetwork.o: SocialNetwork.C SocialNetwork.H User.H defs.H Date.H Message.H
User.o: User.C User.H defs.H Date.H Message.H
# Cleaning old files before new make
clean:
$(RM) SocNetwork screen_test *.o *.bak *~ "#"* core
나는 UNIX에서 메이크 파일을 실행할 때 내가 얻을 :
./makefile: line 2: CCC: command not found
./makefile: line 3: CXXFLAGS: command not found
./makefile: line 4: CCC: command not found
./makefile: line 4: CXXLINK: command not found
./makefile: line 5: OBJS: command not found
./makefile: line 6: RM: command not found
./makefile: line 7: all:: command not found
./makefile: line 9: OBJS: command not found
./makefile: line 9: SocNetwork:: command not found
./makefile: line 10: CXXLINK: command not found
./makefile: line 10: OBJS: command not found
./makefile: line 10: -o: command not found
./makefile: line 12: Date.o:: command not found
./makefile: line 13: main.o:: command not found
./makefile: line 14: Message.o:: command not found
./makefile: line 15: SocialNetwork.o:: command not found
./makefile: line 16: User.o:: command not found
./makefile: line 18: clean:: command not found
./makefile: line 19: RM: command not found
./makefile: line 19: SocNetwork: command not found
사람은 무엇을 말해 주시겠습니까 내 메이크 파일에 문제가 있니? 탭에는 문제가 없습니다. 확인했습니다. 고맙습니다!
시도해 보려면 makefile의 줄 1에있는 shebang을 사용하십시오 :'#!/usr/bin/make -f'. –
오, 내 사랑의 신 ...... >>. << –