Live555: Compiling with VS2008

On May 14, 2011, in Code Monkey, by Tom

Compiling Live555 Streaming Media with Visual Studio 2008 isn’t obvious. Using Cygwin or MinGW is just a pain and frankly unnecessary. There is no built-in support for VS solution files, because Windows support is a low priority for the Live555 community. This is evidenced by this forum response from Ross Finlayson:

>4. Is it possible to include a Visual Studio solution in the
>distrubution to make it more convenient for Windows developers to
>use live555?
>5. Is it possible for live555 to generate adequate makefiles for
>Windows systems with development environments newer than Visual
>Studio 2003?

I have no current plans to change this. (These days, fewer and fewer people seem to be using Windows for development of system software.)

Regardless, Live555 works fine on Windows and is actually quite easy to build. Simply do the following:

  1. Open the ‘win32config’ file and change the TOOLS32=... variable to your VS2008 install directory. For me, it’s TOOLS32=C:\Program Files\Microsoft Visual Studio 9.0\VC
  2. In ‘win32config’, modify the LINK_OPTS_0=... line from msvcirt.lib to msvcrt.lib. This fixes the link error:
    LINK : fatal error LNK1181: cannot open input file 'msvcirt.lib'
  3. Open the Visual Studio command prompt.
  4. From the ‘live’ source directory, run genWindowsMakefiles
  5. Now you’re ready to build. Simply run the following commands:
    cd liveMedia
    nmake /B -f liveMedia.mak
    cd ..\groupsock
    nmake /B -f groupsock.mak
    cd ..\UsageEnvironment
    nmake /B -f UsageEnvironment.mak
    cd ..\BasicUsageEnvironment
    nmake /B -f BasicUsageEnvironment.mak
    cd ..\testProgs
    nmake /B -f testProgs.mak
    cd ..\mediaServer
    nmake /B -f mediaServer.mak

That’s it. You should be good to go.

Tagged with:  

19 Responses to Live555: Compiling with VS2008

  1. Thanks a bunch, I was trying to compile it with VS2010 and having problems. This was really helpful.


  2. jam says:

    Hi, really interesting your guide. The problem for me is that I have to use Live555 in a Qt project using MinGW.

    So, how can I compile Live555 with MinGW? I’m working on XP

    Thank you


  3. john-paul renno says:

    The problem with the script is spaces in the path to compiler given in $(TOOLS32)

    The win32config file must provide the path to VC in quotes if a space is present, however this is concantenated later with other variables along with the quotes. For me this concatenation of variables that were already quotes yielded invalid paths to the comiler exe.

    The solution i employed was to create a duplicate variable of $(TOOLS32)
    without the quotes by doing: something like this:


    subsequently i replaced all concatented occurances of $(TOOLS32) with $(TOOLS32_NO_QUOTES) and voila, each makefile was generated and executed with no problems according to the above.

    PS: i used VS2010 SP1 compiler/linker.


  4. Clay says:

    Thanks for posting this – helped a lot!


  5. Mohanraj says:

    Very useful guide… Thanks


  6. Andrew says:

    Thanks, I remember getting it to build in vs2008 a couple years ago but forgot what I did to make it work :-)

    Most of the time I use linux to build it but this time I wanted to use it in Visual Studio.


  7. peko says:

    Thank you sooo much!


  8. surender says:

    thanks a lot buddy


  9. JZarco says:

    This was really helpfull. Thank you.


  10. zzhou says:

    Saved the day for me!
    Thanks a lot for sharing!


  11. Mirek says:

    Thank you, this guide did the trick!


  12. tarun batra says:

    Can u help us to also calculate the frame rate of streaming video through live media libraries.


  13. tarun batra says:

    can u help us to find the frame of streaming video through live media libraries.


  14. Renata says:

    How can I include live555 in my already existing project?


  15. susterblonde says:

    thank you. the build is success. it created .obj files. but what I need is the .a file. where is it?


  16. Lajos Deak says:

    I managed to go little further with this. The source files can be easily imported as a visual studio projects and nmake can be set up as external build tool.

    With the following steps all nmake projects can be set up per live555 to get a solution.

    for liveMedia:
    VS2010 / File / New / Project from existing source
    set project and source directory
    set as external build tool
    at external build tool pane
    build, rebuild: nmake -b -f liveMedia.mak
    clean: del *.obj; del *.lib

    and works like charm

    please note:
    Its a pity that VS creates a solution per every Project from existing source appliance. But from that its easy to combine the created projects into a common solution.
    nmake likes to work only from actual workdirectory, place the projects to the project directories or use cd before nmake,


  17. apollo says:

    Oh. Thanks very much!
    Good luck for u!


  18. RN says:

    I did what john-paul renno suggested but I get the following error.
    My win32config follows below the error.

    “C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\cl” -c -Iinclude -I
    ../UsageEnvironment/include -I../groupsock/include -Ox -DNDEBUG -c -DCRTAPI1=_cd
    ecl -DCRTAPI2=_cdecl -nologo -GS -D_X86_=1 -DWIN32 -D_WIN32 -W3 -D_WINNT -D_WIN
    32_WINNT=0×0500 -DNTDDI_VERSION=0×05000000 -D_WIN32_IE=0×0500 -DWINVER=0×0500 -
    D_MT -D_DLL -MD -I. -I”C:\Program Files\Microsoft Visual Studio 9.0\VC\include”
    ‘C:\Program’ is not recognized as an internal or external command,
    operable program or batch file.
    NMAKE : fatal error U1077: ‘”C:\Program Files\Microsoft Visual Studio 9.0\VC\bin
    \cl’ : return code ’0×1′

    UI_OPTS = $(guilflags) $(guilibsdll)
    # Use the following to get a console (e.g., for debugging):
    CONSOLE_UI_OPTS = $(conlflags) $(conlibsdll)

    TOOLS32 = C:\Program Files\Microsoft Visual Studio 9.0\VC

    COMPILE_OPTS = $(INCLUDES) $(cdebug) $(cflags) $(cvarsdll) -I. -I”$(TOOLS32_NO_QUOTES)\include”
    C = c
    C_COMPILER = “$(TOOLS32_NO_QUOTES)\bin\cl”
    CPP = cpp
    OBJ = obj
    LINK = $(link) -out:
    LIBRARY_LINK = lib -out:
    LINK_OPTS_0 = $(linkdebug) msvcrt.lib
    SERVICE_LINK_OPTS = kernel32.lib advapi32.lib shell32.lib -subsystem:console,$(APPVER)
    LIB_SUFFIX = lib
    MULTIMEDIA_LIBS = winmm.lib
    EXE = .exe
    PLATFORM = Windows

    rc32 = “$(TOOLS32_NO_QUOTES)\bin\rc”
    $(rc32) $<


    Luis reply on September 8th, 2014 6:23 am:

    RN, did you find the answer to your problem? If so, please post. I’m facing the same problem. Thank you.


Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>