Reference: http://blog.csdn.net/gavinr/article/details/7238453
1. The systems and resources I use
System: XP
Resources: mingw, Perl, msys, OpenSSL, zlib, rtmpdump
Download link mingw: http://download.csdn.net/detail/lightboat09/4485956
Download link Perl + msys + OpenSSL + zlib + rtmpdump
Rtmpdump: http://rtmpdump.mplayerhq.hu/
OpenSSL: http://www.openssl.org/
Zlib: http://zlib.net/
Perl: http://www.filecluster.com/downloads/ActivePerl.html
Msys: http://www.mingw.org/wiki/msys/
Ii. Install the compiling environment
1. Install Perl, run the ActivePerl-5.14.2.1402-MSWin32-x86-295342.msi, always press Enter!
2. Install mingw, run mingw-5.1.6.exe, select current and full for installation, and add the mingw installation path (C:/mingw/bin) to the system environment after installation.
3. Install msys, run msys-1.0.10.exe, and select the path C:/mysy! The default value is C:/mysy/1.0 (this can also be used ),
In the command box that appears, select the mingw installation path. Follow the instructions in English and enter C:/mingw,
If your mingw installation path is C:/mingw
3. Compile source code
Copy the source code of OpenSSL, zlib, and rtmpdump to C :/.
Run msys,
Cd c:
Go to disk C directory
1. OpenSSL
A. modify some symbolic connections in Linux.
CD Test
Rm-F md2test. c
Ln-s dummytest. c md2test. c
Rm-F rc5test. c
Ln-s dummytest. c rc5test. c
Rm-F jpaketest. c
Ln-s dummytest. c jpaketest. c
B. Compile
./Configure mingw -- prefix = 'pwd'/win32libs-dl_endian-dopenssl_no_hw
Make
Make install
2. zlib
CP Win32/makefile. GCC makefile. GCC
Make-F makefile. GCC
3. rtmpdump
A. Copy the dependent library and header file
Copy the OpenSSL folder under OpenSSL/include to the C:/mingw/include directory.
Copy zconf. h and zlib. h under zlib to the C:/mingw/include directory.
Copy libcrypto. A and libssl. A to the C:/mingw/lib directory under OpenSSL
Copy zlib. A under zlib to the C:/mingw/lib directory.
B. Compile
CD rtmpdump
Make sys = mingw
Make sys = mingw install
If everything goes well, you can see the generated librtmp. dll in the rtmpdump/librtmp directory.