On Nov 27, 2012, at 12:19 PM, Burkhard Plaum wrote: > Hi, > > Am 27.11.2012 04:45, schrieb Hans-Christoph Steiner: >> >> Hey Burkhard, >> >> Using gmerlin_avdecoder 1.4.0, I got further than ever building for Windows! > > Cool > >> I ran the build in the MinGW MSYS shell, > > not using Cygwin at all. It seems that the configure.ac assumes that the > > build is being run under Cygwin. Attached is >> a patch that only sets the Cygwin-specific stuff when running in Cygwin. > > Applied. > >> Now it dies on lib/subread.c because Windows and MinGW do not have glob.h or >> glob at all. Maybe there could be a ./configure > > flag to disable subtitles? Removing subread.c from lib/Makefile.am was > > enough to get it to build, but of course linking fails. > > Or even better, Windows support for subtitles. > > What glob does here is the following: > > If you open a movie > > /some/dir/some_movie.avi > > it searches all files matching: > > /some/dir/some_movie* > > To find external subtitles like: > > /some/dir/some_movie_English.srt > /some/dir/some_movie_Deutsch.srt > > Hacking together a Windows functions using FindFirstFile() [1] and > FindNextFile() [2] > would be one possibility. But then I'd like a more generic function like > > char ** bgav_glob(const char * pattern); > > which is implemented with glob() or an equivalent, rather than polluting > subread.c > with #ifdefs. > > Another possibility is to find a Windows version of glob(). I'd be surprised > if noone > tried that yet.
I've looked around quite a bit, and it does not seem to exist, except in Cygwin. But Cygwin is basically an OS on top of an OS, so it doesn't work for most people. I wrote something like this for Pure Data, if you want some example code. Feel free to think of it as public domain and use it in gmerlin under any copyright. Since gmerlin is GPL, I don't need any more. http://pure-data.svn.sourceforge.net/viewvc/pure-data/trunk/externals/hcs/folder_list.c?view=log .hc > > > Here's the error: > > > > libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include -I../include -O3 -s > > -mms-bitfields -march=i686 -mtune=pentium4 > > -DLOCALE_DIR=\"/usr/local/share/locale\" -D__BGAV__ -fvisibility=hidden > > -march=i586 -mtune=i586 -O3 -funroll-all-loops -ffast-math > > -IC:/MinGW/include/libdca -IC:/MinGW/include -IC:/MinGW/include > > -IC:/MinGW/include -IC:/MinGW/include -IC:/MinGW/include -IC:/MinGW/include > > -O3 -s -mms-bitfields -march=i686 -mtune=pentium4 -D_REENTRANT > > -D_FILE_OFFSET_BITS=64 -IC:/MinGW/include -Wall -Wmissing-declarations > > -Wdeclaration-after-statement -MT subread.lo -MD -MP -MF .deps/subread.Tpo > > -c subread.c -DDLL_EXPORT -DPIC -o .libs/subread.o > > subread.c:29:18: fatal error: glob.h: No such file or directory > > compilation terminated. > > No wonder :) > > Burkhard > > P.S. Please send further mails to the low-noise and spam-free gmerlin-general > list (cc'd), it's the official > communication channel. > > > [1] > http://msdn.microsoft.com/en-us/library/windows/desktop/aa364418%28v=vs.85%29.aspx > [2] > http://msdn.microsoft.com/en-us/library/windows/desktop/aa364428%28v=vs.85%29.aspx ------------------------------------------------------------------------------ Keep yourself connected to Go Parallel: INSIGHTS What's next for parallel hardware, programming and related areas? Interviews and blogs by thought leaders keep you ahead of the curve. http://goparallel.sourceforge.net _______________________________________________ Gmerlin-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gmerlin-general
