已知makefile,怎么设置编译环境?
我在Linux下编C++程序,用编辑器、gcc加terminal来工作,但是深感查错和写makefile麻烦,现在迁到集成环境里,不知集成环境怎么设置?已知终端下的编译命令如下:-------------------------------------------------
$ gcc -I/home/intel/opencv/include -L/home/intel/opencv/lib -lopencv -lhighgui -lstdc++ opencv0.c -o opencv0
-------------------------------------------------
或者相应的makefile如下:
-------------------------------------------------
CC = gcc -O2 #-march=i686 -mcpu=i686
INC = -I/home/intel/opencv/include/opencv # opencv include path
LIB = -L/home/intel/opencv/lib # opencv libs path
OPT = -lopencv -lhighgui -lstdc++ # standard libraries needed to link
BIN = opencv0 opencv1 # executables to create
all: $(BIN) # make all creates opencv0 and opencv1
opencv0: opencv0.c Makefile
$(CC) opencv0.c $(INC) $(LIB) $(OPT) -o $@
opencv1: opencv1.c Makefile
$(CC) opencv1.c $(INC) $(LIB) $(OPT) -o $@
clean:
rm * *.o $(BIN) core
--------------------------------------------------
我使用eclipse的managed make c++ project,请问该如何设置?谢啦!!