title: X264: How to compile x264 with swscale support?
body: <p><strong>Objective</strong></p>
  
  <p>I am trying to build:</p>
  
  <ul>
  <li><p>an x264 static library (.lib) with swscale support. I would like to use this library in a Visual Studio project where 24-bit RGB bitmap images are:</p>
  
  <ol>
  <li>Converted from RGB to YUV2</li>
  <li>The converted image is sent to the x264 encoder </li>
  <li>and the output of the encoder is streamed to a remote IP-endpoint via UDP.</li>
  </ol></li>
  <li><p>an x264 executable (.exe) with swscale support. I would like to use the executable for the same purpose as described above. In another Visual Studio project, I will start the x264.exe up as a separate process and pipe bitmap data to the x264 process via its stdin and read out the encoded data from the process's stdout.</p></li>
  </ul>
  
  <p><strong>Problem</strong></p>
  
  <p>I am having some trouble figuring out how to compile with swscale support. I need swscale support for both the executable and the library.</p>
  
  <p><strong>Status</strong> </p>
  
  <p>So far I have downloaded the latest x264 source from the x264 website.</p>
  
  <p>I have installed MINGW on my machine and when I run 'configure' and 'make' I get the x264 static library - but <em>without</em> swscale support.</p>
  
  <p>I haven't been able to find a detailed step-by-step guide on how to include swscale in the x264 library. The closest I've come to a description is this discussion:</p>
  
  <p><a href="http://forum.doom9.org/showthread.php?t=165350" rel="nofollow noreferrer">http://forum.doom9.org/showthread.php?t=165350</a></p>
  
  <p>So I downloaded libpack from:</p>
  
  <p><a href="http://komisar.gin.by/mingw/index.html" rel="nofollow noreferrer">http://komisar.gin.by/mingw/index.html</a></p>
  
  <p>and extracted it to my harddrive:</p>
  
  <p>Then I executed 'make' and 'configure' (again) in my x264 directory:</p>
  
  <pre><code>./configure --extra-cflags="-I/m/somePath/libpack/libpack/libpack/include" --extra-ldflags="-L/m/somePath/libpack/libpack/libpack/lib"
  </code></pre>
  
  <p>I have the following in the lib and include directory:</p>
  
  <p><img src="https://i.stack.imgur.com/ls1pn.png" alt="lib directory"></p>
  
  <p><img src="https://i.stack.imgur.com/2JROa.png" alt="incl directory"></p>
  
  <p>When I execute the above 'configure' I get:</p>
  
  <pre><code>platform:      X86
  system:        WINDOWS
  cli:           yes
  libx264:       internal
  shared:        no
  static:        no
  asm:           yes
  interlaced:    yes
  avs:           avisynth
  lavf:          no
  ffms:          no
  mp4:           lsmash
  gpl:           yes
  thread:        win32
  opencl:        yes
  filters:       crop select_every
  debug:         no
  gprof:         no
  strip:         no
  PIC:           no
  bit depth:     8
  chroma format: all
  
  You can run 'make' or 'make fprofiled' now.
  bash.exe"-3.1$
  </code></pre>
  
  <p>When I execute 'make' I end up with this error:</p>
  
  <pre><code>gcc.exe: error: unrecognized command line option '-fomit-frame-poin'
  gcc.exe: fatal error: no input files
  compilation terminated.
  make: *** [.depend] Error 1
  bash.exe"-3.1$
  </code></pre>
  
  <p><strong>Question</strong>
  What am I doing wrong??</p>