Compilation of x264 project
I had downloaded the source of x264 library.
The version of x264 is 148.
For compilation of shared dlls I am using the following command under MSYS Environment:
./configure --disable-cli --enable-shared --prefix=.
The result is following:
platform: X86_64 byte order: little-endian system: WINDOWS cli: no libx264: internal shared: yes static: no asm: yes interlaced: yes avs: no lavf: no ffms: no mp4: no gpl: yes thread: win32 opencl: yes filters: crop select_every debug: no gprof: no strip: no PIC: yes bit depth: 8 chroma format: all
After execution of make I have the following error:
common/win32thread.o:win32thread.c:(.text+0x60): undefined reference to `_beginthreadex' common/win32thread.o:win32thread.c:(.text+0x60): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `_beginthreadex' collect2: error: ld returned 1 exit status Makefile:192: recipe for target 'libx264-148.dll' failed make: *** [libx264-148.dll] Error 1
My working Environment:
- Windows 10 Pro
- MSYS64 with mingw64
- Microsoft Visual Studio 2015
The configure command was executed without errors, but the make gives me the error described above.
./configure --enable-shared --enable-static --disable-thread
I had the same problem. It works with disabled thread.
x264, the best H.264/AVC encoder, x264, the best H.264/AVC encoder. VideoLAN, a project and a non-profit organization. x264. x264 is a free software library and application for encoding video streams into the H.264/MPEG-4 AVC If it is a crash, then compile x264 with . Compiling x264 on Windows with MSVC Compile the excellent x264 source on Windows using MSYS2 and MSVC.
ShiftMediaProject/x264: Unofficial X264 with added custom , Unofficial X264 with added custom native Visual Studio project build tools. X264: A free software library and application for encoding video streams into the upstream project with additional modifications to allow it to be compiled with Visual� If it is a crash, then compile x264 with ./configure --enable-debug and follow the ffmpeg bugreporting guidelines. Licensing In addition to being free to use under the GNU GPL , x264 is also available under a commercial license.
I used the following option:
./configure --disable-cli --enable-shared
But didn't wanted to disable threads, so, what I did is modified
win32thread.c like this:
#if HAVE_WINRT /* _beginthreadex() is technically the correct option, but it's only available for Desktop applications. * Using CreateThread() as an alternative works on Windows Store and Windows Phone 8.1+ as long as we're * using a dynamically linked MSVCRT which happens to be a requirement for WinRT applications anyway */ #define _beginthreadex CreateThread #define InitializeCriticalSectionAndSpinCount(a, b) InitializeCriticalSectionEx(a, b, CRITICAL_SECTION_NO_DEBUG_INFO) #define WaitForSingleObject(a, b) WaitForSingleObjectEx(a, b, FALSE) #else #include <process.h> #endif
#define _beginthreadex CreateThread #if HAVE_WINRT #define InitializeCriticalSectionAndSpinCount(a, b) InitializeCriticalSectionEx(a, b, CRITICAL_SECTION_NO_DEBUG_INFO) #define WaitForSingleObject(a, b) WaitForSingleObjectEx(a, b, FALSE) #endif
Basically, I replaced
_beginthreadex by Windows' native
CreateThread. Not sure it's a huge problem for x264, but now I can compile.
x264, Compiling x264 on Windows with MSVC Compiling FFmpeg with X264 on Windows 10 using MSVC A couple of steps to Used for the Nike Rise 2.0 project. Now in libx264-120.def “120” is the version of the x264 you are using, you can find the version of the x264 you are using by opening the x264.h file in your x264 source folder you will see something like this #define X264_BUILD 120 depending on your version.
Compiling x264 on Windows with MSVC, If you are on windows, you can compile through MSYS + MinGW. The x264 project only provides source code, no pre-compiled binaries! CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100
How to compile x264 [Archive], Contribute to MasterNobody/x264 development by creating an account on GitHub. Fix crash of MSVC builds compiled with --system-libx264 and /MT (default) CRT.
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: Converted from RGB to YUV2; The converted image is sent to the x264 encoder ; and the output of the encoder is streamed to a remote IP-endpoint via UDP. an x264 executable (.exe) with swscale support.