Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>As a general answer to this question to get <em>any</em> sdk to work, you need to do three things:</p> <ul> <li><code>#include</code> the appropriate headers in your source so that the compiler can check you've used the right functions and the linker knows which symbols you're refering to.</li> <li>Tell the compiler where your header files are. You can do this with gcc using <code>gcc -I/path/to/header/dir</code>.</li> <li>Tell the linker where the libs are that are to be compiled in and to include them. Again, using gcc, you do this with <code>gcc -L/path/to/library/dir</code> and you tell gcc (well, ld) to link to a specific library using <code>gcc -lnamewithoutlibprefix</code> (lowercase l).</li> </ul> <p>As an example for a library I use a lot, MPIR, against the /opt tree, I might compile like this:</p> <pre><code>gcc -I/opt/include -L/opt/lib -lmpir myprog.c -o myprog </code></pre> <p>That's just an example and is very Linux-specific. In truth, MPIR is installed in /usr and I don't need to do this, I'm just picking on it by way of example here.</p> <p>For Windows, take a look at <a href="http://msdn.microsoft.com/en-us/library/73f9s62w%28VS.80%29.aspx" rel="nofollow noreferrer">cl /I</a>, and <a href="http://msdn.microsoft.com/en-us/library/y0zzbyt4.aspx" rel="nofollow noreferrer">LINK.EXE options</a>.</p> <p>Of course, you can automate this process under a number of different development environments. Visual Studio, for example, will generate the correct command lines for you if you fill in the right dialog boxes. So I believe will Eclipse and I know Dev/C++ can, too.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload