Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fail to build client #6

Open
jinzhao-SU opened this issue May 19, 2020 · 2 comments
Open

fail to build client #6

jinzhao-SU opened this issue May 19, 2020 · 2 comments

Comments

@jinzhao-SU
Copy link

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}’
out_json_file = ofstream(out_json_path);
^
In file included from /usr/include/c++/5/ios:38:0,
from /usr/include/c++/5/ostream:38,
from /usr/include/c++/5/iostream:39,
from ./src/main.cpp:2:
/usr/include/c++/5/iosfwd:119:11: note: declaration of ‘std::ofstream {aka class std::basic_ofstream}’
class basic_ofstream;
^
./src/main.cpp:185:31: error: ‘fourcc’ is not a member of ‘cv::VideoWriter’
writer.open(out_vid_path, VideoWriter::fourcc('M', 'P', '4', 'V'), fps, Size(cap_width, cap_height), true);
^
Makefile:35: recipe for target 'obj/main.o' failed
make: *** [obj/main.o] Error 1

@imsoo
Copy link
Owner

imsoo commented May 20, 2020

@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.

@jinzhao-SU
Copy link
Author

I change opencv to version 3.4 and then fix all the problems. Thank you for the detailed response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants