Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to build static library and integration to ffmpeg? #205

Open
cgeffect opened this issue Aug 18, 2024 · 0 comments
Open

How to build static library and integration to ffmpeg? #205

cgeffect opened this issue Aug 18, 2024 · 0 comments

Comments

@cgeffect
Copy link

cgeffect commented Aug 18, 2024

libzimg.a is now compiled,
pkgconfig like this

prefix=/home/third_party/prebuild/third_party/zimg/deploy
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: zimg
Description: Scaling, colorspace conversion, and dithering library
Version: 3.0.5

# If building a static library against a C++ runtime other than libstdc++,
# define STL_LIBS when running configure.
Libs: -L${libdir} -lzimg
Libs.private: -lstdc++
Cflags: -I${includedir}

ffmpeg shell like this

./configure \
    --extra-cflags=-fpic \
    --extra-cxxflags=-fpic \
    --prefix="${workdir}/deploy/" \
    --enable-shared \
    --enable-filters \
    --enable-filter=zscale \
    --enable-libzimg \
    --extra-cflags="-I$x264_dir/include -I$libvpx_dir/include -I$zimg_dir/include" \
    --extra-ldflags="-L$x264_dir/lib -L$libvpx_dir/lib -L$zimg_dir/lib" && \
make -j 12 && \
make install

But if you link static libraries, it will appear ERROR: zimg >= 2.7.0 not found using pkg-config, but link dynamic library is ok. why?
I've set export PKG_CONFIG_PATH=${zimg_pkg_dir} , I'm sure zimg_pkg_dir is the right path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant