0
g++ -I include/ -I include/gliese/ -I include/othello/ -c src/OthelloHeuristics.cpp -o obj/Debug/src/OthelloHeuristics.o
g++ -I include/ -I include/gliese/ -I include/othello/ -c src/OthelloNegamaxSearch.cpp -o obj/Debug/src/OthelloNegamaxSearch.o
g++ -I include/ -I include/gliese/ -I include/othello/ -c src/main.cpp -o obj/Debug/src/main.o
g++ -L lib -l othello -l SDL_image -l SDL_ttf -l SDL obj/Debug/src/main.o obj/Debug/src/OthelloHeuristics.o obj/Debug/src/OthelloNegamaxSearch.o -o bin/Debug/othello

目前我正在运行这些线路以构建游戏,并且它可以工作。但是有没有办法将它们合并为一个?(为了获得一些速度)。谢谢!

4

1 回答 1

0

你可以这样写

g++ -I include/gliese/ -c src/OthelloHeuristics.cpp src/OthelloNegamaxSearch.cpp  src/main.cpp 

g++ -L lib -l othello -l SDL_image -l SDL_ttf -l SDL obj/Debug/src/*.o -o bin/Debug/othello
于 2013-10-08T14:49:52.357 回答