[Live-devel] Patch enabling use as a DLL on Win32

Alex Cichowski alex.cichowski at gmail.com
Mon Nov 17 22:50:05 PST 2008


Dear Live555 developers,

I have created a patch that adds the necessary support for compiling
Live555 as a DLL under Visual C++ on Win32, and believe this may be
useful for other Live555 users. It may be downloaded here:
    http://sites.google.com/site/patchfiles1234/Home/LIVE_API.patch

The main change necessary is to tag all API functions and classes with
LIVE_API in the headers. LIVE_API gets #defined to
__declspec(dllimport) or __declspec(dllexport) as appropriate by a new
header "LiveGlobal.hh", which gets included by all other headers. The
user then needs to #define LIVE_EXPORTS when building the DLL, and
LIVE_DLL when using the DLL. I believe this strategy to be standard
practice for supporting DLL compilation.

Also, appropriate Visual C++ 2005 project and solution files are here
in case anyone finds them useful:
    http://sites.google.com/site/patchfiles1234/Home/live555.sln
    http://sites.google.com/site/patchfiles1234/Home/live555.vcproj
These take the approach of producing a single DLL named "live555.dll"
(or live555d.dll for debug mode) containing all four of Live555's main
libraries

Though I have not tested it, I believe the LIVE_API tag is equally
useful for compiling as a DLL under GCC/Cygwin on Win32.

This patch is against live.2008.11.13.tar.gz.

Regards,
Alex


More information about the live-devel mailing list