How to compile
ymGdragon opened this issue · 2 comments
ymGdragon commented
I dont't know how to compile this file,tell me the steps please.
lieff commented
Hi :)
Almost all compilers should compile test application without special switches (but probably you want tune it for maximum performance).
Here build script used in travis CI: https://github.com/lieff/minih264/blob/master/scripts/build_x86.sh
Minimal gcc example with milti-threading support (4 max threads by default):
gcc -O3 -o minih264e minih264e_test.c system.c -lm -lpthread
and without milti-threading:
gcc -O3 -DH264E_MAX_THREADS=0 -o minih264e minih264e_test.c -lm
You can use mingw copmiler to build for windows (no threading sample):
x86_64-w64-mingw32-gcc -O3 -DH264E_MAX_THREADS=0 -o minih264e.exe minih264e_test.c -lm
And after 1434b8c commit you can use msvc:
cl.exe /Ob2 /DH264E_MAX_THREADS=0 minih264e_test.c libcmt.lib oldnames.lib kernel32.lib
Compilers I've checked: gcc, clang, mingw, msvc. But since it's valid C11 more should work out of box.
lieff commented
Closing due to lack of activity.