imsoo / darknet_server

Darknet (Open source neural networks framework) Server
MIT License
29 stars 7 forks source link

Makefile:50: recipe for target 'obj/yolo_detector.o' failed #3

Closed wtnan2003 closed 4 years ago

wtnan2003 commented 4 years ago

After successfully build a library libdarknet.so

when I do this:

Build darknet_server
git clone https://github.com/imsoo/darknet_server
cd darknet_server/server
make

then cause the problem:

./src/yolo_detector.cpp: In member function ‘std::vector<std::cxx11::basic_string > YoloDetector::objects_names_from_file(std::cxx11::string)’: ./src/yolo_detector.cpp:25:30: error: variable ‘std::ifstream file’ has initializer but incomplete type std::ifstream file(filename); ^ ./src/yolo_detector.cpp: In member function ‘virtual void YoloDetector::draw(cv::Mat)’: ./src/yolo_detector.cpp:44:40: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] int max_width = (text_size.width > i.w + 2) ? text_size.width : (i.w + 2); ^ ./src/yolo_detector.cpp:36:13: warning: unused variable ‘colors’ [-Wunused-variable] int const colors[6][3] = { { 1,0,1 },{ 0,0,1 },{ 0,1,1 },{ 0,1,0 },{ 1,1,0 },{ 1,0,0 } }; ^ Makefile:50: recipe for target 'obj/yolo_detector.o' failed make: *** [obj/yolo_detector.o] Error 1

Any help would be helpful, thx!

imsoo commented 4 years ago

@wtnan2003

Thank you for your interest in this repo.

Sorry, I forgot <fstream> header.

Please add this. #include <fstream>

/* yolo_detector.cpp */
#include "yolo_detector.hpp"
#include <fstream> /* Here */