-
Notifications
You must be signed in to change notification settings - Fork 180
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
cannot link library FFMpeg on Windows #350
Comments
It might be related to the issue with pkg-config that also prevents me from building ffmpeg using the media-autobuild suite: m-ab-s/media-autobuild_suite#2298 |
ok, but as far as I know VS doesn't create pkg-config ".pc" files, So what's the solution? |
oh right, I didn't realise that, but you can basically just create it manually from src/kvazaar.pc.in 😅 Typically in linux
|
So I was messing around with things a bit and the proper way to do this might be to build Kvazaar also in msys2. Since our scripts are not really built for msvc, you need to sed -i 's/-Wall -Wextra -Wvla -Wno-sign-compare -Wno-unused-parameter//g' configure.ac
sed -i 's/ -ftree-vectorize -fvisibility=hidden//g' configure.ac
sed -i 's/KVZ_CFLAGS=\"/KVZ_CFLAGS=\"-DKVZ_STATIC_LIB -I.\/threadwrapper\/include\/ -I ..\/include\//g' configure.ac
sed -i 's/-I\$srcdir\/src/-I ./g' configure.ac
sed -i 's/AX_PTHREAD(/#AX_PTHREAD(/g' configure.ac
sed -i 's/PTHREAD_CFLAGS=-pthread//g' configure.ac
sed -i 's/PTHREAD_LIBS=-lpthread//g' configure.ac
sed -i 's/libkvazaar_la_SOURCES =/libkvazaar_la_SOURCES = \\\n\tthreadwrapper\/src\/pthread.cpp \\\n\tthreadwrapper\/src\/semaphore.cpp/g' src/Makefile.am
sed -i 's/kvazaar_SOURCES =/kvazaar_SOURCES = extras\/getopt.c /g' src/Makefile.am
sed -i 's/CFLAGS=\"\$PTHREAD_CFLAGS \$CFLAGS\"/CPPFLAGS=\"\$CFLAGS\"/g' configure.ac
sed -i 's/CC=\"\$PTHREAD_CC\"//g' configure.ac
./autogen.sh
LD=link.exe CC=cl ./configure --enable-static
make
make install ..for shared build just remove the I hope this helps |
Here's a full code to compile Kvazaar + ffmpeg in msys2: |
@fador it worked like a charm, tried both methods (manually and the scripts you've provided) |
Workaround the pkg-config on MinGW: |
isn't this bug resolved ? I have no problem with mingw, ffmpeg is built with kvazaar support |
I have build the library using visual studio and now I want to use it in ffmpeg
Downloaded the source code of ffmpeg and according to documentation for Windows I have to build it under msys2
I can configure ffmpeg and successfully build everything when not enabling kvazaar; but when I try this
I get "ERROR: kvazaar >= 0.8.1 not found using pkg-config", which I think is logical since under windows there is no package file
The text was updated successfully, but these errors were encountered: