[rtmpdump] Compiling rtmpdump on Windows
Michael Nye
michael.nye1 at gmail.com
Sat Mar 5 00:46:48 CET 2016
Hi All,
There are half a dozen guides online for compiling rtmpdump on Windows but
most are many years old and don't seem to be relevant. From what I've
pieced together from them though I have managed to "compile" the latest
version of rtmpdump but
a) get some warnings during make, which I'm not sure I should be
b) get either DNS errors or "failed to create socket" errors when I try to
use my build.
When there are no such problems when I use the last windows release. I
want to compile the latest code base as the last windows release seems to
be quite a bit behind and I'm getting what appears to be buffering errors
which may be fixed/addressed in newer commits.
I'm not great with c++ builds - I've got mingw / msys and also cygwin all
installed with a variety of library dependency downloaded.
Anyway my build output is as below. If anyone can give me pointers (or is
willing to write a fresh/current guide for Windows 10) it would be
appreciated.
$ make SYS=mingw
> make[1]: Entering directory '/cygdrive/c/Repo/rtmpdump/librtmp'
> gcc -Wall -DRTMPDUMP_VERSION=\"v2.4\" -DUSE_OPENSSL -O2 -fPIC -c -o
> rtmp.o rtmp.c
> rtmp.c:1:0: warning: -fPIC ignored for target (all code is position
> independent)
> /*
> ^
> rtmp.c: In function ‘RTMP_ReadPacket’:
> rtmp.c:3555:7: warning: variable ‘didAlloc’ set but not used
> [-Wunused-but-set-variable]
> int didAlloc = FALSE;
> ^
> gcc -Wall -DRTMPDUMP_VERSION=\"v2.4\" -DUSE_OPENSSL -O2 -fPIC -c -o
> log.o log.c
> log.c:1:0: warning: -fPIC ignored for target (all code is position
> independent)
> /*
> ^
> gcc -Wall -DRTMPDUMP_VERSION=\"v2.4\" -DUSE_OPENSSL -O2 -fPIC -c -o
> amf.o amf.c
> amf.c:1:0: warning: -fPIC ignored for target (all code is position
> independent)
> /*
> ^
> In file included from amf.c:33:0:
> bytes.h:74:2: warning: #warning "Float word order not defined, assuming
> the same as byte order!" [-Wcpp]
> #warning "Float word order not defined, assuming the same as byte order!"
> ^
> gcc -Wall -DRTMPDUMP_VERSION=\"v2.4\" -DUSE_OPENSSL -O2 -fPIC -c -o
> hashswf.o hashswf.c
> hashswf.c:1:0: warning: -fPIC ignored for target (all code is position
> independent)
> /*
> ^
> gcc -Wall -DRTMPDUMP_VERSION=\"v2.4\" -DUSE_OPENSSL -O2 -fPIC -c -o
> parseurl.o parseurl.c
> parseurl.c:1:0: warning: -fPIC ignored for target (all code is position
> independent)
> /*
> ^
> ar rs librtmp.a rtmp.o log.o amf.o hashswf.o parseurl.o
> ar: creating librtmp.a
> gcc -shared -Wl,--out-implib,librtmp.dll.a -o librtmp-1.dll rtmp.o log.o
> amf.o hashswf.o parseurl.o -lssl -lcrypto -lz -lws2_32 -lwinmm -lgdi32
> ln -sf librtmp-1.dll librtmp.dll
> make[1]: Leaving directory '/cygdrive/c/Repo/rtmpdump/librtmp'
> gcc -Wall -DRTMPDUMP_VERSION=\"v2.4\" -O2 -c -o rtmpdump.o rtmpdump.c
> rtmpdump.c: In function ‘main’:
> rtmpdump.c:727:16: warning: ‘optarg’ redeclared without dllimport
> attribute: previous dllimport ignored [-Wattributes]
> extern char *optarg;
> ^
> gcc -Wall -o rtmpdump.exe rtmpdump.o -Llibrtmp -lrtmp -lssl -lcrypto -lz
> -lws2_32 -lwinmm -lgdi32
> gcc -Wall -DRTMPDUMP_VERSION=\"v2.4\" -O2 -c -o rtmpgw.o rtmpgw.c
> gcc -Wall -o rtmpgw.exe rtmpgw.o thread.o -Llibrtmp -lrtmp -lssl
> -lcrypto -lz -lws2_32 -lwinmm -lgdi32
> gcc -Wall -DRTMPDUMP_VERSION=\"v2.4\" -O2 -c -o rtmpsrv.o rtmpsrv.c
> gcc -Wall -o rtmpsrv.exe rtmpsrv.o thread.o -Llibrtmp -lrtmp -lssl
> -lcrypto -lz -lws2_32 -lwinmm -lgdi32
> gcc -Wall -DRTMPDUMP_VERSION=\"v2.4\" -O2 -c -o rtmpsuck.o rtmpsuck.c
> gcc -Wall -o rtmpsuck.exe rtmpsuck.o thread.o -Llibrtmp -lrtmp -lssl
> -lcrypto -lz -lws2_32 -lwinmm -lgdi32
When I try to run I firstly get this error
C:/Repo/rtmpdump/rtmpdump.exe: error while loading shared libraries:
> librtmp-1.dll: cannot open shared object file: No such file or directory
When I copy this DLL out of the child folder and into the rtmpdump folder
it then seems to work, but then I get unexpected errors
If I use a DNS alias:
Connecting ...
> ERROR: Problem accessing the DNS.
> DEBUG: Closing connection.
If I use a direct IP:
Connecting ...
> ERROR: RTMP_Connect0, failed to create socket. Error: 22
> DEBUG: Closing connection.
Alternatively if anyone is actively developing still and can provide a new
Windows release, that would be appreciated. However I would like to build
myself so I can attempt to debug/fix the errors I get.
Thanks,
Michael.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mplayerhq.hu/pipermail/rtmpdump/attachments/20160305/fd4d3660/attachment.html>
More information about the rtmpdump
mailing list