Opened 17 months ago
#9606 new defect
Cannot build FFmpeg on CYGWIN
Reported by: | Carlo Bramini | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | git-master | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
I cloned the latest development sources and I tried to build them on CYGWIN. Unfortunately, I got these errors:
src/libavdevice/gdigrab.c: In function ‘gdigrab_read_header’: src/libavdevice/gdigrab.c:252:12: error: implicit declaration of function ‘utf8towchar’ [-Werror=implicit-function-declaration] 252 | if(utf8towchar(name, &name_w)) { | ^~~~~~~~~~~
CC libavcodec/mf_utils.o In file included from /usr/include/w32api/dshow.h:33, from src/libavcodec/mf_utils.h:32, from src/libavcodec/mf_utils.c:25: /usr/include/w32api/strsafe.h: In function ‘StringGetsExWorkerW’: /usr/include/w32api/strsafe.h:1859:18: error: ‘WEOF’ undeclared (first use in this function); did you mean ‘EOF’? 1859 | if(ch==WEOF) { | ^~~~ | EOF
but hopefully they are easy to fix.
1) Since src/libavdevice/gdigrab.c is compiled also in CYGWIN then libavutil/wchar_filename.h must be included also for it in addition to _WIN32.
2) WEOF requires to manually include wchar.h under CYGWIN. When compiling also under MinGW-w64, this tiny addition did not make any difference in my tests.
I attached a patch with my solution.
Attachments (1)
Note:
See TracTickets
for help on using tickets.
The patch