Closed huangjinshe closed 11 months ago
When I build it in MingW32 as shared, the final dll files really small, it's good but when I click ffmpeg.exe it shows: xx.dll missing....(like zlib.dll or libfdk-aac.dll ....etc, they always installed in MingW32 by pacman command, the configuration and make command all normal , no error)
By building them all as static libraries themselves. And cleaning out any shared remnants out of the toolchain. Leaves the linker no choice but to pick the static version.
What I did was installe: mingw32/mingw-w64-i686-openh264
in MingW32,
and then add command in configuration:
--extra-cxxflags='-I/mingw32/include' --extra-ldflags='-L/mingw32/lib`
I thought this will search the .h
file and .o
file from those folders and compile with ffmpeg together, but turns out it's not. it will still throw error when running ffmpeg.exe: xx.dll missing
.
Not quite sure I follow. I literally build every single dependency manually, including the entire toolchain, specifically tuning it to produce binaries with a minimal set of external dependencies. It got little to do with flags you pass to ffmpeg configure.
Wow...build every single dependency manually? that must be take a lot of time. Could you share them with us (the dependency source code you've already download)? then we could remove something we don't need.
I'm also thank you for answering me.
You are right now looking at the repository with the entire set of scripts to do so. 90% of its contents deal with buildings the toolchain and dependencies.
OK, I have last question, I did not found you link any 3rd party libraries in the command line from ffmpeg.exe
, it just show --enable-xx or disable-xx, how did you let it automatically take the include and lib folder for compile the 3rd party libraries ?
That's what configure does. It finds external libraries and figures out how to link them and where the headers are stored. Most of them are found via pkg-config, and a few just have hardcoded names.
Thank you for telling me that. Obviously my configure did not do that for me..... looks like I need to check it again.
That likely means your build environment is not properly set up. Missing pkg-config, mixing in packages for a different arch, and other things.
Any reason you don't just use the scripts provided here, if that's your goal anyway?
To be honest I don't really understand how the scripts running which you provide, also I want to build it as Win32 x86 with less size ( remove some feature I don't need), so I don't think it's really suitable for me without customizing.
Just delete the stuff you don't want from scripts.d and build away. That's all there is to it really.
It would be really helpful if you could do some video tutorials for this. I have a lot of question when I first met this project, What is this? docker image? or what. How it is running. it required bash and docker? why? what bash do and docker? The ReadMe too simple in main page, simgple eough I don't know what is this. If I understand how it worked, I might already done it.
All you have to do is run the makeimage.sh and build.sh with your desired variant after making your modifications. I don't see how a video tutorial would be at all useful for that. Just keep in mind that it doesn't work reliably on Windows with MinGW, so I'd strongly recommend running it in WSL.
And yes, you need working docker for this, since it's heavily used for the entire process. And bash is just what all the scripts are written for.
So does that mean:
If that's it, this is a really really easy thing. Maybe I was thinking too complex before.
The entire job of the scripts in this repo is to automate all that. Really, just delete the stuff you don't want from scripts.d, run makeimage.sh with your desired target, and then build.sh with the exact same one.
Sure, I'll try. Thank you again.
I thought we only could compile static, then it could include some 3rd party libraries. but you could build it as shared and also could include some 3rd-part libraries. could you tell me how? thanks.