mx-maskrcnn icon indicating copy to clipboard operation
mx-maskrcnn copied to clipboard

fatal error: opencv2/opencv.hpp

Open wuyi1983 opened this issue 8 years ago • 1 comments

I install opencv by using conda install -c menpo opencv=2.4.11

After running "make -j USE_BLAS=atlas USE_CUDA=1 USE_CUDA_PATH=/usr/local/cuda USE_CUDNN=1", I got the error.

How to fix the problem?

Thanks

wuyi1983 avatar Nov 30 '17 20:11 wuyi1983

you should modify the following file in the Makefile

CFLAGS += -I$(ROOTDIR)/mshadow/ -I$(ROOTDIR)/dmlc-core/include -fPIC -I$(NNVM_PATH)/include -I$(DLPACK_PATH)/include -Iinclude $(MSHADOW_CFLAGS)

to add your opencv's include dir and library dir. Which is

CFLAGS += -I/path/to/your/opencv/include/dir -L/path/to/your/opencv/lib -I$(ROOTDIR)/mshadow/ -I$(ROOTDIR)/dmlc-core/include -fPIC -I$(NNVM_PATH)/include -I$(DLPACK_PATH)/include -Iinclude $(MSHADOW_CFLAGS)

and the include dir is always your/conda/path/include and lib is your/conda/path/lib

hlthu avatar Dec 04 '17 09:12 hlthu