fight_detection
fight_detection copied to clipboard
fail to build client
I am very interested in this project. Could you please check the error msg? I build server part successfully, but stuck with the client.
/usr/include/x86_64-linux-gnu/sys/select.h:78:0: note: this is the location of the previous definition
#define FD_SETSIZE __FD_SETSIZE
^
./src/main.cpp:87:10: error: aggregate ‘std::ofstream out_json_file’ has incomplete type and cannot be defined
ofstream out_json_file;
^
./src/main.cpp: In function ‘int main(int, char**)’:
./src/main.cpp:142:13: error: ‘CAP_PROP_FPS’ was not declared in this scope
cap.set(CAP_PROP_FPS, 20);
^
./src/main.cpp:143:13: error: ‘CAP_PROP_BUFFERSIZE’ was not declared in this scope
cap.set(CAP_PROP_BUFFERSIZE, 3);
^
./src/main.cpp:159:24: error: ‘CAP_PROP_FPS’ was not declared in this scope
double fps = cap.get(CAP_PROP_FPS);
^
./src/main.cpp:160:23: error: ‘CAP_PROP_FRAME_COUNT’ was not declared in this scope
end_frame = cap.get(CAP_PROP_FRAME_COUNT);
^
./src/main.cpp:176:43: error: invalid use of incomplete type ‘std::ofstream {aka class std::basic_ofstream
@jinzhao-SU
Thank you for your interest in this repo.
/usr/include/x86_64-linux-gnu/sys/select.h:78:0: note: this is the location of the previous definition #define FD_SETSIZE __FD_SETSIZE
- This message can be ignored.
./src/main.cpp:87:10: error: aggregate ‘std::ofstream out_json_file’ has incomplete type and cannot be defined ofstream out_json_file;
- Sorry, I forgot
<fstream>header. I fixed it. Try this
./src/main.cpp:142:13: error: ‘CAP_PROP_FPS’ was not declared in this scope cap.set(CAP_PROP_FPS, 20);
- It looks like OpenCV version problem. Try below changes. If it doesn't work let me know your OpenCV version.
| Line | From | To |
|---|---|---|
| 142 | CAP_PROP_FPS | CV_CAP_PROP_FPS |
| 143 | CAP_PROP_BUFFERSIZE | CV_CAP_PROP_BUFFERSIZE |
| 158 | CAP_PROP_FPS | CV_CAP_PROP_FPS |
| 159 | CAP_PROP_FRAME_COUNT | CV_CAP_PROP_FRAME_COUNT |
| 184 | VideoWriter::fourcc('M', 'P', '4', 'V') | CV_FOURCC('M', 'P', '4', 'V') |
Note : This client have a freezing issue on Linux.
If you have the same issue, please let me know.
I change opencv to version 3.4 and then fix all the problems. Thank you for the detailed response.