title: Error compiling testOnDemandRTSPServer.cpp (From the Live555 libraries)
body: <p>I'm trying to figure out how to compile <a href="http://www.live555.com/liveMedia/doxygen/html/testOnDemandRTSPServer_8cpp-source.html" rel="nofollow">testOnDemandRTSPServer.cpp</a> as found in the testProgs directory from the live555 media server source. I am using Ubuntu 11.04 and have installed the <em>liblivemedia-dev</em> libraries.</p>
  
  <p>I have modified the header includes (within <a href="http://www.live555.com/liveMedia/doxygen/html/testOnDemandRTSPServer_8cpp-source.html" rel="nofollow">testOnDemandRTSPServer.cpp</a>), to:</p>
  
  <pre><code>#include &lt;liveMedia/liveMedia.hh&gt;
  #include &lt;BasicUsageEnvironment/BasicUsageEnvironment.hh&gt;
  </code></pre>
  
  <p>And used this command to compile:</p>
  
  <pre><code>g++ -lliveMedia -lgroupsock -lBasicUsageEnvironment -lUsageEnvironment testOnDemandRTSPServer.cpp -o RTSPServer
  </code></pre>
  
  <p>Which then results in the error:</p>
  
  <pre><code>In file included from /usr/include/liveMedia/MediaSink.hh:25:0,
               from /usr/include/liveMedia/RTPSink.hh:25,
               from /usr/include/liveMedia/MultiFramedRTPSink.hh:26,
               from /usr/include/liveMedia/AudioRTPSink.hh:25,
               from /usr/include/liveMedia/MPEG1or2AudioRTPSink.hh:25,
               from /usr/include/liveMedia/liveMedia.hh:27,
               from testOnDemandRTSPServer.cpp:21:
  /usr/include/liveMedia/FramedSource.hh:25:23: fatal error: NetCommon.h: No such file or directory
  compilation terminated.
  </code></pre>
  
  <hr>
  
  <p>At this point I figured sweet deal, it's just a redirection problem between header files. I then modified <a href="http://www.live555.com/liveMedia/doxygen/html/FramedSource_8hh-source.html" rel="nofollow">/usr/include/liveMedia/FramedSource.hh</a> to use <code>#include &lt;groupsock/NetCommon.h&gt;</code> instead of <code>#include "NetCommon.h"</code> - since NetCommon.h lives in /usr/include/groupsock/</p>
  
  <p>This worked, until I found a million other redirection problems like:</p>
  
  <ul>
  <li><code>/usr/include/liveMedia/Media.hh:29:22: fatal error: Boolean.hh: No
  such file or directory</code></li>
  <li><code>/usr/include/liveMedia/Media.hh:33:31: fatal
  error: UsageEnvironment.hh: No such file or directory</code></li>
  <li>Etc...</li>
  </ul>
  
  <p>So, am I linking to the live555 libraries correctly in the first place, or will I have to constantly change the header locations as needed?</p>
  
  <h2>Update</h2>
  
  <p>So I continued to change the header locations using the aforementioned method, but now I get a million undefined reference errors... <a href="http://pastebin.com/Lb2z7LzG" rel="nofollow">as shown here</a> (Sorry, too much to post here)</p>
  
  <p>Now I'm scratching my head, as the original testOnDemandRTSPServer.cpp compiles with no hitches (using the configure/make method); and the only thing I've changed is where to look for header files.</p>