usleep not found: include unistd.h in Qt GUI (Patch #1809)


Added by Xing Chen almost 13 years ago. Updated almost 13 years ago.


Status:Done Start date:2012-04-16
Priority:Normal Due date:
Assignee:Andrey Kamaev % Done:

0%

Category:build/install
Target version:2.4.0
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

Description

More specifically, please add something like this in modules/highgui/src/window_QT.cpp:

1#ifdef _WIN32
2#include <windows.h>
3#else
4#include <unistd.h>
5#endif

Otherwise it doesn't compile in newer gcc:

.../opencv/modules/highgui/src/window_QT.cpp: In function ‘int cvWaitKey(int)’:
.../opencv/modules/highgui/src/window_QT.cpp:321:28: error: ‘usleep’ was not declared in this scope


Associated revisions

Revision 24c7bdc3
Added by Andrey Kamaev almost 13 years ago

#1809 include unistd.h required for usleep

Revision 3f927abb
Added by Roman Donchenko over 11 years ago

Merge pull request #1809 from ilya-lavrenov:ocl_resize_nn

History

Updated by Andrey Kamaev almost 13 years ago

Thanks for the report!
Patch is applied in 2.4 branch.

  • Status changed from Open to Done
  • Target version set to 2.4.0
  • Description changed from More specifically, please add something like this in modules/highgui/src/wind... to More specifically, please add something like this in @modules/highgui/src/win... More
  • Assignee changed from Alexander Shishkov to Andrey Kamaev

Also available in: Atom PDF