0
我的主要使用的類方法已過時。我已經更新了方法到終端,但沒有任何顯示。我在方法調用之前和之後放了一個cout,並且它們都正在打印。這讓我覺得我在編譯錯誤。主要使用過時的類
我重視我的Makefile:
RM = rm -f
SRCPATH = .
SRC = actors/actor.h controllers/AiController.h controllers/Controller.h \
controllers/PlayerController.h states/BrawlState.h states/DrinkState.h \
states/IdleState.h states/IStateCallback.h states/MineState.h \
states/SingState.h states/SleepState.h states/state.h states/statemachine.h \
resources/dynamicarray.h resources/hashmap.h resources/hashnode.h \
resources/heap.h resources/queue.h resources/stack.h resources/vector3d.h
TESTNAME = test
TESTSRC = main.cpp
#
retest: re test
clean:
-$(RM) *.o
-$(RM) *~
-$(RM) \#*
-$(RM) *.core
-$(RM) *.gch
fclean: clean
-$(RM) $(TESTNAME)
re: fclean
test:
g++ $(SRC) $(TESTSRC) -Wall -Werror -std=c++0x -o $(TESTNAME)
你只有頭文件,還是有'.cpp'文件? – juanchopanza
我只有頭文件,因爲它們是類。 – Taztingo
這實際上沒有任何意義,但確定。你需要使'test'依賴於所有頭文件,加上'main.cpp'。沒有'test'沒有依賴關係。 – juanchopanza