Building live555 Streaming Media in Windows result in .obj files, not .a - build

I'm trying to stream rtsp video via tcp using mplayer in windows minGW shell and it depends on live555 streaming media library.
The steps I did are:
download the live555 streaming media src
build each .mak files in src/live/ (I use nmake /f *.mak via command line, because my VS2010 can't recognize the .mak files.)
Building process was success and the result are .obj files. The problem is mplayer need .a files to make and the build didn't create it.
My question is:
do I really need the .a files? If so, how do I get it?
is there any other build method I can use to solve this?
Thanks :)

Solved it.
Do I need .a files?
Yes, I need them.
How to get it?
run ./genMakeFiles mingw in src/live/ from MinGW
run make

run ./genMakefiles
run make
you can refer below link
http://www.live555.com/liveMedia/

Related

How can I build amazon kinesis webrtc sdk in C on windows - missing header files

I'm trying to build WebRTC SDK in C for Embedded Devices on windows.
I have configured using CMake with -DBUILD_DEPENDENCIES=0, and have installed various libraries manually such as pthreads, usrsctp, libssl etc.
I don't have gstreamer installed, so I do get a message about not being able to configure one of the examples, but that is expected.
I'm running cmake from a "x64 native tools command prompt for vs 2019", hence the configuration below.
So after configuration I have a visual studio solution, which as far as I can tell should be able to build the examples.
However, the code uses an include file that is referencing non-existent files in the SDK. In particular, Include.h in com/amazonaws/kinesis/video/webrtcclient/ begins with:
#include <com/amazonaws/kinesis/video/client/Include.h>
#include <com/amazonaws/kinesis/video/common/Include.h>
#include <com/amazonaws/kinesis/video/webrtcclient/NullableDefs.h>
#include <com/amazonaws/kinesis/video/webrtcclient/Stats.h>
but there is no client or common directory in com/amazonaws/kinesis/video. The com directory is in the repo directory src\include, which to me looks like the video\client dir should have been checked out if it exists, rather than built.
I also don't see any solution to build any kinesis libraries, but the examples seem to include a lot of the source files directly - so is this SDK supposed to build a library as well?
Have I missed a build step somewhere? Do I need to download/build the rest of the kinesis video stream stuff as well as the webrtc sdk?
Yes you will need to build the other KVS libraries that the WebRTC implementation depends on.
You can find them in the .gitmodules of the project.
You can also see how they are built/configured in the CMakeLists.txt

The built ffmpeg.exe is not working as expected

In my c++ application, I want to use ffmpeg lib statically.
I downloaded the ffmpeg-3.4.1 source and built the statically linked ffmpeg using MINGW, Yasm and VS2015 Command prompt as follows,
Downloaded the msys2-x86_64-20161025.exe
On opening the MINGW command prompt, install the required gcc tool using command "pacman -S make gcc diffutils"
Renamed C:\msys64\usr\bin\link.exe to C:\msys64\usr\bin\link_orig.exe
Downloaded the yasm 32 bit exe and set it's path to PATH environment variable. ("%PATH%;D:\ffmpeg")
Run VS2015, and open MINGW- C:\msys64\msys2_shell.cmd -use-full-path
On opening MingW, change pwd to ffmpeg. Run ./configure then make the make install.
The configuration is used : ./configure --prefix="build" --toolchain=msvc --arch=x86 --enable-yasm --enable-asm --disable-shared --enable-static
It is built successfully. I got the bin folder having ffmpeg.exe and ffprobe.exe. The size of ffmpeg.exe is 18 Mb. Also the 7 libs as .a file.
I guess I have to convert.a files to .lib and use in application?
I wanted to confirm if I have built everything correctly. So I tried to convert a .webm file to mp4 using the built ffmpeg.exe. I found that the size of output file is very large and quality is too bad. The input.webm file size was only 15 Mb and output.mp4 file size was about 188 Mb.
Then I downloaded the statically link ffmpeg application from https://ffmpeg.zeranoe.com/builds/. I see the size of ffmpeg.exe is about 35 Mb and It works fine. For same .webm file, it created .mp4 file only 44 Mb and quality is also ok. I figured out that it is built with lots of external libs.
Are external libs creating the difference or my built ffmpeg application is not right? Do I need all those libs in my application too in order to get similar output?
screenshot output.mp4 from built ffmpeg.exe(15 Mb)
Without external libraries linked in, FFmpeg can already do many (but not all) things you will want it to do, and it will also in many cases not be as good at them as it would be with the specialized libs.
So, in short, yes, you need those external libs for the majority of common cases (especially if it involves MP4 and other modern formats).
So that brings us to building FFmpeg:
Building FFmpeg is a nightmarish experience. And that is on linux, where it is the easiest.
On Windows, where you seem to need it, it reaches Lovecraftian levels of horror - which you already glanced at.
Thankfully, this wonderful helper script exists:
https://github.com/rdp/ffmpeg-windows-build-helpers
Set up a virtual machine running a recent Ubuntu (or other distro if you prefer) and follow the "Cross-compiling from a Linux environment" steps.
I do not recommend using the Windows pipeline with cygwin or msys, as that is just incredibly slow compared to doing it all natively on linux (or even in a VM).
The script is also extremely configurable, so you can make changes as you wish. In my case, for example, I removed the "--disable-shared" option from the build script as I needed a dynamic build.

How to build Crypto++ library on Linux with MinGW?

im trying to port a c++ project from visual studio 2013 to netbeans on ubuntu. The target is a windows executable, so far im able to compile windows exe files from netbeans using mingw as compiler.
The project needs the Crypto++ library and i only have the .lib version for visual studio. To include the library in netbeans i first need to build the Crypto++ library in the .a format.
Its not clear to me how should i do that.
Ive found informations on how to build the library for linux with mingw but not for cross compilation with mingw. The provided GNUmakefile does not work.
Should i set up a vm with windows and mingw and compile the library that way? Or maybe use the qmake "hack" as suggested here http://www.qtcentre.org/threads/28809-Compiling-amp-using-Crypto-with-mingw-version-of-Qt ? The last good Crypto++ version suggested there is quite old. This is confusing, porting the whole project is easier than having the required library.
Im open to any suggestion.
tldr: how to build libcryptopp.a on linux for the cross compilation of a windows exe project
edit:
for example if i cross compile something there are windows libraries in the /usr/i686-w64-mingw32/lib/ folder like libuser32.a. i need to make the equivalend libcryptopp.a.. sorry if is a bit unclear.
if i simply build using the steps in answer (and in the wiki) i end up with a libcryptopp.a file but i suspect is linux-only, cause if i link that library in netbeans in the .exe file im cross compiling i end up with undefined references to cryptopp stuff everywere. the paths are correct, i suspect the library needs to be replaced with the equivalent libcryptopp.a compatible with crosscompiling.
edit2: im trying to follow the answer down here, now im stuck here. after this command to build cryptopp.
make CXX=/usr/bin/i686-w64-mingw32-gcc INCLUDES="-I /usr/i686-w64-mingw32/include" LIBS="-L /usr/i686-w64-mingw32/lib" CXXFLAGS="-std=c++0x"
and many variations of it i always end up with this error
trap.h:26:25: fatal error: Windows.h: No such file or directory
# include
which makes me think its using the right compiler to make a .a lib file for cross compiling the windows .exe with the lib.
however i dont understand whats going on now with the missing header..:(
Also if i try to link the lib file (used with visual studio) i get a lot of linking errors, undefined reference to cryptopp stuff.
ill offer a symbolic beer (a couple of $ of Bitcoins) if someone finds out how to do it.
Inspired by http://wiki.amule.org/wiki/Cross-compilation_for_windows_with_mingw:
sudo apt-get install mingw-w64
git clone https://github.com/weidai11/cryptopp
cd cryptopp
export TARGET=i686-w64-mingw32
CXX=$TARGET-g++ RANLIB=$TARGET-ranlib AR=$TARGET-ar LDLIBS=-lws2_32 make -f GNUmakefile
I've found informations on how to build the library for linux with mingw but not for cross compilation with mingw.
Its relatively easy...
Get Crypto++ ZIP into MinGW.
Unpack Crypto++ ZIP.
Change directories.
Build the library.
Verify All tests passed.
(1) and (2) can be tricky because Cygwin and MinGW are missing a lot of tools. So curl https://www.cryptopp.com/cryptopp563.zip -o cryptopp563.zip may not work.
For (2), I seem to recall ZIP is missing, so unzip -aoq cryptopp563.zip -d cryptopp-5.6.3 may not work.
At step (4), just perform make static dynamic test and be sure it finished with All tests passed.
I do a lot of testing with Cygwin and MinGW. I have a script that copies Crypto++ into the environments from my Desktop. I have not been able to figure out a way to automate it. A recent question on automating it was closed, so no one can supply an answer (see How to automate software testing for Cygwin and MinGW).

Using libcurl without installing it

How can I use libcurl with my project without actually installing it or curl on the system?
I want to make my source-code portable, so that any developer can copy the folder with all sources and other files, run make and compile the program without the need for system level installations.
I am looking for (probably separate) solutions for Linux and for Windows (dll?). If it is possible, provide some standard/official solution and not hack (I'd like to be educated about linking third party libraries)
I've used it on Windows using Visual Studio, all you need to do under Windows:
Download the source
Using CMake generate the project files (when using Visual Studio).
Build the libraries, 3 files will be built: libcurl.lib, libcurl_imp.lib and libcurl.dll
Include curl.h in your project and add the paths to your .lib files
Build your program, put libcurl.dll in the executable folder and it will work.
On Linux it should be a similar process, build the libraries and include them with your source.
You probably want to build a static library out of libcurl and link agains it. Should be pretty straightforward and the process is almost identical on every OS.

Problems with BOOST library c++

I want to use the boost library in a c++ project I'm doing in emacs on linux, but I am having troubles getting it to work. I don't want to actually install it on my machine. I want to be able to use the regex part of boost. I want to be able to tar my source files and send them to another computer (that is likely not to have boost installed, nor will I be able to install it) and be able to compile my project. I have tried using the make file in the regex folder and made both a .a and .so, but I can't get it to compile when linking the library and setting the includes to the boost folder (I have tried multiple folders in the boost directory as well--many of them recommended by Google, but to no avail). I keep getting a "cannot find regex/config.hpp" error.
Is there anyway to include everything in one file like a .so or .a and get it to work this way? I am okay with including the regex folder itself as well, butt...
If I were to do it this way would I have to include the whole boost folder with my project anyway? That might be doable, but I don't want my tar file to be that big.
why not just listing boost as a dependencies and let user install it ?
If not, use Boost bcp to extract regex and its dependencies to a standalone library.
At first you need to build regex library in boost. Without this library you can't use
boost.regex.