Release 4.0.11 tarball
[rtaudio.git] / doc / html / compiling.html
1 <HTML>
2 <HEAD>
3 <TITLE>The RtAudio Home Page</TITLE>
4 <LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
5 <LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
6 </HEAD>
7 <BODY BGCOLOR="#FFFFFF">
8 <CENTER>
9 <a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
10 <HR>
11 <!-- Generated by Doxygen 1.6.2 -->
12 <div class="contents">
13
14
15 <h1><a class="anchor" id="compiling">Debugging &amp; Compiling </a></h1><h2><a class="anchor" id="debug">
16 Debugging</a></h2>
17 <p>If you are having problems getting <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> to run on your system, make sure to pass a value of <em>true</em> to the <a class="el" href="classRtAudio.html#af0752ee51cce3dd90a3bd009f9fdbe77" title="Specify whether warning messages should be printed to stderr.">RtAudio::showWarnings()</a> function (this is the default setting). A variety of warning messages will be displayed which may help in determining the problem. Also, try using the programs included in the <code>tests</code> directory. The program <code>audioprobe</code> displays the queried capabilities of all hardware devices found for all APIs compiled. When using the ALSA and JACK APIs, further information can be displayed by defining the preprocessor definition __RTAUDIO_DEBUG__.</p>
18 <h2><a class="anchor" id="compile">
19 Compiling</a></h2>
20 <p>In order to compile <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> for a specific OS and audio API, it is necessary to supply the appropriate preprocessor definition and library within the compiler statement: </p>
21 <table class="doxtable" border="2" cols="5" width="100%">
22 <tr bgcolor="beige">
23 <td width="5%"><b>OS:</b> </td><td width="5%"><b>Audio API:</b> </td><td width="5%"><b>C++ Class:</b> </td><td width="5%"><b>Preprocessor Definition:</b> </td><td width="5%"><b>Library or Framework:</b> </td><td><b>Example Compiler Statement:</b>  </td></tr>
24 <tr>
25 <td>Linux </td><td>ALSA </td><td>RtApiAlsa </td><td>__LINUX_ALSA__ </td><td><code>asound, pthread</code> </td><td><code>g++ -Wall -D__LINUX_ALSA__ -o audioprobe audioprobe.cpp RtAudio.cpp -lasound -lpthread</code>  </td></tr>
26 <tr>
27 <td>Linux </td><td>PulseAudio </td><td>RtApiPulse </td><td>__LINUX_PULSE__ </td><td><code>pthread</code> </td><td><code>g++ -Wall -D__LINUX_PULSE__ -o audioprobe audioprobe.cpp RtAudio.cpp -lpthread</code>  </td></tr>
28 <tr>
29 <td>Linux </td><td>OSS </td><td>RtApiOss </td><td>__LINUX_OSS__ </td><td><code>pthread</code> </td><td><code>g++ -Wall -D__LINUX_OSS__ -o audioprobe audioprobe.cpp RtAudio.cpp -lpthread</code>  </td></tr>
30 <tr>
31 <td>Linux or Macintosh OS-X </td><td>Jack Audio Server </td><td>RtApiJack </td><td>__UNIX_JACK__ </td><td><code>jack, pthread</code> </td><td><p class="starttd"><code>g++ -Wall -D__UNIX_JACK__ -o audioprobe audioprobe.cpp RtAudio.cpp `pkg-config --cflags --libs jack` -lpthread</code> </p>
32 <p class="endtd"></p>
33 </td></tr>
34 <tr>
35 <td>Macintosh OS-X </td><td>CoreAudio </td><td>RtApiCore </td><td>__MACOSX_CORE__ </td><td><code>pthread, CoreAudio</code> </td><td><code>g++ -Wall -D__MACOSX_CORE__ -o audioprobe audioprobe.cpp RtAudio.cpp -framework CoreAudio -lpthread</code>  </td></tr>
36 <tr>
37 <td>Windows </td><td>Direct Sound </td><td>RtApiDs </td><td>__WINDOWS_DS__ </td><td><code>dsound.lib (ver. 5.0 or higher), multithreaded</code> </td><td><em>compiler specific</em>  </td></tr>
38 <tr>
39 <td>Windows </td><td>ASIO </td><td>RtApiAsio </td><td>__WINDOWS_ASIO__ </td><td><em>various ASIO header and source files</em> </td><td><em>compiler specific</em>  </td></tr>
40 </table>
41 <p>The example compiler statements above could be used to compile the <code>audioprobe.cpp</code> example file, assuming that <code>audioprobe.cpp</code>, <code><a class="el" href="RtAudio_8h.html">RtAudio.h</a></code>, <code><a class="el" href="RtError_8h_source.html">RtError.h</a></code>, and <code>RtAudio.cpp</code> all exist in the same directory. </p>
42 </div>
43 <HR>
44
45 <table><tr><td><img src="../images/mcgill.gif" width=165></td>
46   <td>&copy;2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
47 </table>
48
49 </BODY>
50 </HTML>