[FFmpeg-trac] #9606(undetermined:new): Cannot build FFmpeg on CYGWIN

FFmpeg trac at avcodec.org
Thu Jan 20 16:52:27 EET 2022


#9606: Cannot build FFmpeg on CYGWIN
-------------------------------------+-------------------------------------
             Reporter:  Carlo        |                     Type:  defect
  Bramini                            |
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:  git-
  undetermined                       |  master
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 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.
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/9606>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list