VLC Cygwin Compile
| 
 Contents
 1. °³¿ä ¶º» ¹®¼´Â VLC¸¦ Windows Cygwin ȯ°æ¿¡¼ ÄÄÆÄÀÏ ÇÏ´Â ¹æ¹ý¿¡ ´ëÇÏ¿© ¼³¸íÇÑ´Ù. º» ¹®¼¿¡¼´Â H.264°¡ Àç»ýµÇ´Â ÃÖ¼Ò »çÀÌÁî·Î VLC°¡ ÄÄÆÄÀϵǵµ·Ï µÇµµ·Ï ¼³Á¤Çß´Ù.
 2.2. cygwin prepare ¶
 2.2.1. select following packages ¶
Archive
  unzip
  zip
Devel
  autoconf
  automake
  binutils
  cvs (optional: for building extras/contrib)
  gcc
  gcc-core
  gcc-g++
  gcc-mingw
  gcc-mingw-core
  gcc-mingw-g++
  gdb
  gettext
  gettext-devel
  git
  libgcrypt-devel
  libiconv
  libtool
  make
  mingw-runtime
  nasm
  patchutils
  pkg-config
  subversion (optional: for building extras/contrib)
Editor
  vim
Libs
  expat
  libgcrypt
Utils
  ncurses
Web
  curl (optional: for building extras/contrib)
  wget (optional: for building extras/contrib)
 
 2.3. nsis install ¶It will require nsis to make self-extract install file.
 http://nsis.sourceforge.net/Download (current lastest version 2.4.5) 2.4. extract library ¶
$> tar xf contrib-20090922-win32-bin-gcc-4.2.1-sjlj-runtime-3.15.2-only.tar.bz2  -C /
$> tar xf contrib-1.0.0.tar.gz2 -C /
 and remove moc, uic and rcc to let only uic.exe moc.exe and rcc.exe in /usr/win32/bin folder
 2.6. configure ¶Execute following bootstrap and configure command.
 
 $> ./bootstrap <== this will make configure file using autotools.
 $> PATH=/usr/win32/bin:$PATH \
PKG_CONFIG_LIBDIR=/usr/win32/lib/pkgconfig \
CPPFLAGS="-I/usr/win32/include -I/usr/win32/include/ebml" \
LDFLAGS=-L/usr/win32/lib \
CC="ccache gcc -mno-cygwin" CXX="ccache g++ -mno-cygwin" \
./configure \
    --host=i686-pc-mingw32 \
    --disable-gtk \
    --disable-fluidsynth \
    --enable-nls --enable-sdl --with-sdl-config-path=/usr/win32/bin \
    --enable-avcodec --enable-avformat --enable-swscale \
    --enable-faad --enable-flac --enable-theora \
    --with-wx-config-path=/usr/win32/bin \
    --with-freetype-config-path=/usr/win32/bin \
    --with-fribidi-config-path=/usr/win32/bin \
    --enable-live555 --with-live555-tree=/usr/win32/live.com \
    --enable-caca --with-caca-config-path=/usr/win32/bin \
    --with-xml2-config-path=/usr/win32/bin \
    --with-dvdnav-config-path=/usr/win32/bin \
    --disable-cddax --disable-vcdx --enable-goom \
    --disable-twolame --enable-dvdread \
    --enable-debug  --enable-dca \
    --disable-mkv --disable-taglib --disable-zvbi
 2.7. compile ¶$> make -j 4
 -j4 means 4 files compile parellal.
$> make package-win32-base If you want to create auto installer, it require 7z util (refer TroubleShoot 3.7)
 $> make package-win32 
 2.8. test ¶
$> cd vlc-1.0.2
$> chmod 755 vlc.exe vlc.exe.manifest <- if you don't set execute permission, It will display permission error.
$> ./vlc.exe -I "dummy" "rtsp://192.168.1.2:7070/h264"
$> or execute vlc.exe
 3.1. GCC select version 4 ¶You should use GCC version 3.xx to compile vlc. gcc-mingw doe's not support gcc-4.x.x
 3.2. C Compiler cannot create executables ¶
i686-pc-mingw32-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking how to create a ustar tar archive... gnutar
checking whether to enable maintainer-specific portions of Makefiles... yes
checking for style of include used by make... GNU
checking for i686-pc-mingw32-gcc... gcc -mno-cygwin
checking for C compiler default output file name...
configure: error: in `/home/sosuri/vlc-1.0.2':
configure: error: C compiler cannot create executables
 3.3. cygwin Dos or Unix mode change ¶
 
[sosuri@h ~]$ mount
C:\cygwin\bin on /usr/bin type system (binmode)
C:\cygwin\lib on /usr/lib type system (binmode)
C:\cygwin on / type system (binmode)
 
 3.4. /home/sosuri/vlc-1.0.2/modules/codec/fluidsynth.c:120: undefined reference to `_ _imp__fluid_synth_sfunload' ¶add configure --disable-fluidsynth
 3.7. 7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on vlc-1.0.2-win32.7z vlc-1.0.2 ¶if you do a command like this "make package-win32", this display"
 install p7zip using cygwin setup
 3.8. /usr/win32/bin/moc: /usr/win32/bin/moc: cannot execute binary file ¶and remove moc, uic and rcc to let only uic.exe moc.exe and rcc.exe
 4. vlc optimize ¶
 Enabled modules:
 a52tospdif access_smb adjust alphamask aout_directx aout_file audio_format audioscrobbler avcodec avformat bandlimited_resampler bda blend blendbench bluescreen canvas chain clone colorthres converter_float crop croppadd deinterlace direct3d dmo dolby_surround_decoder dshow dtstospdif dvdnav equalizer erase extract fake float32_mixer folder freetype gaussianblur gestures globalhotkeys glwin32 gnutls gradient grain headphone_channel_mixer hotkeys http i420_rgb_mmx i420_rgb_sse2 i420_ymga i420_ymga_mmx i420_yuy2 i420_yuy2_mmx i420_yuy2_sse2 i422_i420 i422_yuy2 i422_yuy2_mmx i422_yuy2_sse2 invert libmpeg2 linear_resampler live555 logo magnify marq memcpy3dn memcpymmx memcpymmxext mosaic motionblur motiondetect msn noise normvol ntservice osd_parser osdmenu panoramix param_eq png podcast postproc psychedelic puzzle qt4 rc ripple rotate rss rv32 sap scale scaletempo scene screen sharpen shout showintf simple_channel_mixer skins2 spatializer spdif_mixer swscale telnet telx transform unzip vmem vout_directx wall wave waveout wingdi x264 yuv yuvp yuy2_i420 yuy2_i422 zip 5. debugging ¶$> gdb --args vlc.exe --fast-mutex --reset-config --reset-plugins-cache 
 or 
$> libtool --mode=execute gdb --args vlc --reset-config --reset-plugins-cache In the debugger mode run the program and make sure you reset the preferences!
 (gdb) run 
 To backtrace all the running threads use: 
 (gdb) thread apply all bt
 | You will have long and healthy life. | 














 


