[rtmpdump] MSVC Support (static lib w/CRYPTO)
hyc at highlandsun.com
Wed Apr 14 07:18:32 CEST 2010
Anony Mous wrote:
> Alright, I've made the necessary modifications to allow librtmp (not the executables, just the
> library) to compile as a 32 bit C (not C++) static lib under MS Visual C 2008. The patch (see
> attachment) is based on revision 426 of the rtmpdump svn depot.
> The change includes two headers found online to simulate stdint and stdbool support under windows,
> the headers for any relevant license terms. The Visual Studio project defines CRYPTO, and specifies
> an include path for openssl that expects openssl to exist as a sibling directory of the rtmpdump
> directory, and for the openssl directory to be named 'openssl-0.9.8k'. Because of this, if you link
> the rtmpdump static lib to an application, you must also link openssl-0.9.8k to your application or
> you will encounter undefined externals at link time.
> In case it matters, I consider my code portions in this patch (everything excluding the stdint.h and
> stdbool.h files) to be public domain, and will claim no copyright on them.
> Because of MSVC's lack of C99 support, many changes had to be made to variable declarations that
> were occurring following statements. If this patch is accepted, it will require effort to maintain
> the MSVC support because of the lack of C99. My intent was to make it easy to link in librtmp
> support to applications (XBMC specifically) under win32. MinGW might be an alternative way to
> achieve that, but I have not explored that option.
Most of it looks good, but where did you get stdint.h and stdbool.h from?
Shouldn't MSVC users just grab these and install them in their MSVC images?
Seems like they're too useful in general to just be stashed away in our source
tree. I'd rather just include a link to where they can be obtained.
Using OpenSSL 0.9.8k is kind of odd, since it's quite old and probably has a
number of security vulnerabilities. These guys are currently offering builds
and 0.9.8n has already been released.
The current code builds painlessly using MinGW; I used the MSYS environment to
put everything together. I haven't tried building XBMC on Win32 though. Have
no idea what the build dependencies are like for that...
More information about the rtmpdump